diff --git a/.config/lf/cleaner b/.config/lf/cleaner new file mode 100755 index 0000000..a29be40 --- /dev/null +++ b/.config/lf/cleaner @@ -0,0 +1,2 @@ +#!/bin/sh +exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file /dev/tty diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..5696300 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,2 @@ +set previewer ~/.config/lf/previewer +set cleaner ~/.config/lf/cleaner diff --git a/.config/lf/previewer b/.config/lf/previewer new file mode 100755 index 0000000..f57e9d2 --- /dev/null +++ b/.config/lf/previewer @@ -0,0 +1,24 @@ +#!/bin/sh +draw() { + kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" /dev/tty + exit 1 +} + +file="$1" +w="$2" +h="$3" +x="$4" +y="$5" + +case "$(file -Lb --mime-type "$file")" in + image/*) + draw "$file" + ;; + video/*) + # vidthumb is from here: + # https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb + draw "$(vidthumb "$file")" + ;; +esac + +pistol "$file" diff --git a/fonts/Hack/HackNerdFont-Bold.ttf b/fonts/Hack/HackNerdFont-Bold.ttf new file mode 100644 index 0000000..d2abd6f Binary files /dev/null and b/fonts/Hack/HackNerdFont-Bold.ttf differ diff --git a/fonts/Hack/HackNerdFont-BoldItalic.ttf b/fonts/Hack/HackNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..3bc6e31 Binary files /dev/null and b/fonts/Hack/HackNerdFont-BoldItalic.ttf differ diff --git a/fonts/Hack/HackNerdFont-Italic.ttf b/fonts/Hack/HackNerdFont-Italic.ttf new file mode 100644 index 0000000..6b81819 Binary files /dev/null and b/fonts/Hack/HackNerdFont-Italic.ttf differ diff --git a/fonts/Hack/HackNerdFont-Regular.ttf b/fonts/Hack/HackNerdFont-Regular.ttf new file mode 100644 index 0000000..124e362 Binary files /dev/null and b/fonts/Hack/HackNerdFont-Regular.ttf differ diff --git a/fonts/Hack/HackNerdFontMono-Bold.ttf b/fonts/Hack/HackNerdFontMono-Bold.ttf new file mode 100644 index 0000000..5cb890b Binary files /dev/null and b/fonts/Hack/HackNerdFontMono-Bold.ttf differ diff --git a/fonts/Hack/HackNerdFontMono-BoldItalic.ttf b/fonts/Hack/HackNerdFontMono-BoldItalic.ttf new file mode 100644 index 0000000..58961fa Binary files /dev/null and b/fonts/Hack/HackNerdFontMono-BoldItalic.ttf differ diff --git a/fonts/Hack/HackNerdFontMono-Italic.ttf b/fonts/Hack/HackNerdFontMono-Italic.ttf new file mode 100644 index 0000000..30094a3 Binary files /dev/null and b/fonts/Hack/HackNerdFontMono-Italic.ttf differ diff --git a/fonts/Hack/HackNerdFontMono-Regular.ttf b/fonts/Hack/HackNerdFontMono-Regular.ttf new file mode 100644 index 0000000..6c95cc0 Binary files /dev/null and b/fonts/Hack/HackNerdFontMono-Regular.ttf differ diff --git a/fonts/Hack/HackNerdFontPropo-Bold.ttf b/fonts/Hack/HackNerdFontPropo-Bold.ttf new file mode 100644 index 0000000..1bf09f6 Binary files /dev/null and b/fonts/Hack/HackNerdFontPropo-Bold.ttf differ diff --git a/fonts/Hack/HackNerdFontPropo-BoldItalic.ttf b/fonts/Hack/HackNerdFontPropo-BoldItalic.ttf new file mode 100644 index 0000000..2f3cc91 Binary files /dev/null and b/fonts/Hack/HackNerdFontPropo-BoldItalic.ttf differ diff --git a/fonts/Hack/HackNerdFontPropo-Italic.ttf b/fonts/Hack/HackNerdFontPropo-Italic.ttf new file mode 100644 index 0000000..37d5571 Binary files /dev/null and b/fonts/Hack/HackNerdFontPropo-Italic.ttf differ diff --git a/fonts/Hack/HackNerdFontPropo-Regular.ttf b/fonts/Hack/HackNerdFontPropo-Regular.ttf new file mode 100644 index 0000000..35ddd09 Binary files /dev/null and b/fonts/Hack/HackNerdFontPropo-Regular.ttf differ diff --git a/fonts/Hack/LICENSE.md b/fonts/Hack/LICENSE.md new file mode 100644 index 0000000..08927e5 --- /dev/null +++ b/fonts/Hack/LICENSE.md @@ -0,0 +1,45 @@ +The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License + +The work in the DejaVu project was committed to the public domain. + +Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" + +### MIT License + +Copyright (c) 2018 Source Foundry Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### BITSTREAM VERA LICENSE + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: + +The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". + +This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. + +The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. diff --git a/fonts/Hack/README.md b/fonts/Hack/README.md new file mode 100644 index 0000000..b68dfd7 --- /dev/null +++ b/fonts/Hack/README.md @@ -0,0 +1,48 @@ +# Nerd Fonts + +This is an archived font from the Nerd Fonts release v3.2.1. + +For more information see: +* https://github.com/ryanoasis/nerd-fonts/ +* https://github.com/ryanoasis/nerd-fonts/releases/latest/ + +# Hack + +A typeface designed for source code. + +For more information have a look at the upstream website: https://github.com/source-foundry/Hack + +Version: 3.003 + +## Which font? + +### TL;DR + +* Pick your font family: + * If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`). + * If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv. + * If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`). + +### Ligatures + +Ligatures are generally preserved in the patched fonts. +Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`. +If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings. + +### Explanation + +Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices: + +#### `Option 1: Download already patched font` + + * For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases) + * Or download the development version from the folders here + +#### `Option 2: Patch your own font` + + * Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size) + +For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font) + +[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a + diff --git a/nvim-config/init.vim b/nvim-config/init.vim index 951a78b..1539194 100644 --- a/nvim-config/init.vim +++ b/nvim-config/init.vim @@ -47,6 +47,9 @@ Plug 'ryanoasis/vim-devicons' Plug 'preservim/vim-markdown' Plug 'dhruvasagar/vim-table-mode' +" Inline-Images +Plug '3rd/image.nvim' + " Code-Folds Plug 'tmhedberg/SimpylFold' @@ -56,10 +59,12 @@ Plug 'mhinz/vim-sayonara' " Session-Management Plug 'xolox/vim-session' | Plug 'xolox/vim-misc' - " todo.txt Plug 'freitass/todo.txt-vim' +" Treesitter +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + " LSP Plug 'williamboman/mason.nvim' Plug 'williamboman/mason-lspconfig.nvim' @@ -68,14 +73,11 @@ Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-buffer' Plug 'hrsh7th/cmp-path' Plug 'hrsh7th/cmp-cmdline' +Plug 'dcampos/cmp-snippy' +Plug 'dcampos/nvim-snippy' Plug 'hrsh7th/nvim-cmp' Plug 'onsails/lspkind.nvim' -" For vsnip users. -Plug 'hrsh7th/cmp-vsnip' -Plug 'hrsh7th/vim-vsnip' -Plug 'rafamadriz/friendly-snippets' - " markdown-preview " If you have nodejs Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' } @@ -196,6 +198,40 @@ lua <'] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [''] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. [""] = cmp.mapping(function(fallback) if cmp.visible() then if #cmp.get_entries() == 1 then @@ -245,7 +281,7 @@ lua <`. @@ -263,10 +299,10 @@ lua <