added lf, Hack font & tweaked nvim-conf
This commit is contained in:
parent
56d963b0e3
commit
a78fdf9f0d
2
.config/lf/cleaner
Executable file
2
.config/lf/cleaner
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file </dev/null >/dev/tty
|
2
.config/lf/lfrc
Normal file
2
.config/lf/lfrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
set previewer ~/.config/lf/previewer
|
||||||
|
set cleaner ~/.config/lf/cleaner
|
24
.config/lf/previewer
Executable file
24
.config/lf/previewer
Executable file
@ -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/null >/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"
|
BIN
fonts/Hack/HackNerdFont-Bold.ttf
Normal file
BIN
fonts/Hack/HackNerdFont-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFont-BoldItalic.ttf
Normal file
BIN
fonts/Hack/HackNerdFont-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFont-Italic.ttf
Normal file
BIN
fonts/Hack/HackNerdFont-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFont-Regular.ttf
Normal file
BIN
fonts/Hack/HackNerdFont-Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontMono-Bold.ttf
Normal file
BIN
fonts/Hack/HackNerdFontMono-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontMono-BoldItalic.ttf
Normal file
BIN
fonts/Hack/HackNerdFontMono-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontMono-Italic.ttf
Normal file
BIN
fonts/Hack/HackNerdFontMono-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontMono-Regular.ttf
Normal file
BIN
fonts/Hack/HackNerdFontMono-Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontPropo-Bold.ttf
Normal file
BIN
fonts/Hack/HackNerdFontPropo-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontPropo-BoldItalic.ttf
Normal file
BIN
fonts/Hack/HackNerdFontPropo-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontPropo-Italic.ttf
Normal file
BIN
fonts/Hack/HackNerdFontPropo-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/Hack/HackNerdFontPropo-Regular.ttf
Normal file
BIN
fonts/Hack/HackNerdFontPropo-Regular.ttf
Normal file
Binary file not shown.
45
fonts/Hack/LICENSE.md
Normal file
45
fonts/Hack/LICENSE.md
Normal file
@ -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.
|
48
fonts/Hack/README.md
Normal file
48
fonts/Hack/README.md
Normal file
@ -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
|
||||||
|
|
@ -47,6 +47,9 @@ Plug 'ryanoasis/vim-devicons'
|
|||||||
Plug 'preservim/vim-markdown'
|
Plug 'preservim/vim-markdown'
|
||||||
Plug 'dhruvasagar/vim-table-mode'
|
Plug 'dhruvasagar/vim-table-mode'
|
||||||
|
|
||||||
|
" Inline-Images
|
||||||
|
Plug '3rd/image.nvim'
|
||||||
|
|
||||||
" Code-Folds
|
" Code-Folds
|
||||||
Plug 'tmhedberg/SimpylFold'
|
Plug 'tmhedberg/SimpylFold'
|
||||||
|
|
||||||
@ -56,10 +59,12 @@ Plug 'mhinz/vim-sayonara'
|
|||||||
" Session-Management
|
" Session-Management
|
||||||
Plug 'xolox/vim-session' | Plug 'xolox/vim-misc'
|
Plug 'xolox/vim-session' | Plug 'xolox/vim-misc'
|
||||||
|
|
||||||
|
|
||||||
" todo.txt
|
" todo.txt
|
||||||
Plug 'freitass/todo.txt-vim'
|
Plug 'freitass/todo.txt-vim'
|
||||||
|
|
||||||
|
" Treesitter
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
Plug 'williamboman/mason.nvim'
|
Plug 'williamboman/mason.nvim'
|
||||||
Plug 'williamboman/mason-lspconfig.nvim'
|
Plug 'williamboman/mason-lspconfig.nvim'
|
||||||
@ -68,14 +73,11 @@ Plug 'hrsh7th/cmp-nvim-lsp'
|
|||||||
Plug 'hrsh7th/cmp-buffer'
|
Plug 'hrsh7th/cmp-buffer'
|
||||||
Plug 'hrsh7th/cmp-path'
|
Plug 'hrsh7th/cmp-path'
|
||||||
Plug 'hrsh7th/cmp-cmdline'
|
Plug 'hrsh7th/cmp-cmdline'
|
||||||
|
Plug 'dcampos/cmp-snippy'
|
||||||
|
Plug 'dcampos/nvim-snippy'
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
Plug 'hrsh7th/nvim-cmp'
|
||||||
Plug 'onsails/lspkind.nvim'
|
Plug 'onsails/lspkind.nvim'
|
||||||
|
|
||||||
" For vsnip users.
|
|
||||||
Plug 'hrsh7th/cmp-vsnip'
|
|
||||||
Plug 'hrsh7th/vim-vsnip'
|
|
||||||
Plug 'rafamadriz/friendly-snippets'
|
|
||||||
|
|
||||||
" markdown-preview
|
" markdown-preview
|
||||||
" If you have nodejs
|
" If you have nodejs
|
||||||
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
|
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
|
||||||
@ -196,6 +198,40 @@ lua <<EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
require("image").setup({
|
||||||
|
backend = "kitty",
|
||||||
|
integrations = {
|
||||||
|
markdown = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||||
|
},
|
||||||
|
neorg = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "norg" },
|
||||||
|
},
|
||||||
|
html = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
css = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
max_width = nil,
|
||||||
|
max_height = nil,
|
||||||
|
max_width_window_percentage = nil,
|
||||||
|
max_height_window_percentage = 50,
|
||||||
|
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||||
|
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||||
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
|
||||||
|
})
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
unpack = unpack or table.unpack
|
unpack = unpack or table.unpack
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
@ -214,9 +250,9 @@ lua <<EOF
|
|||||||
snippet = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
end,
|
end,
|
||||||
formatting = {
|
formatting = {
|
||||||
@ -232,7 +268,7 @@ lua <<EOF
|
|||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
if #cmp.get_entries() == 1 then
|
if #cmp.get_entries() == 1 then
|
||||||
@ -263,10 +299,10 @@ lua <<EOF
|
|||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'vsnip' }, -- For vsnip users.
|
-- { name = 'vsnip' }, -- For vsnip users.
|
||||||
-- { name = 'luasnip' }, -- For luasnip users.
|
-- { name = 'luasnip' }, -- For luasnip users.
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
{ name = 'snippy' }, -- For snippy users.
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user