diff options
author | Max Christian Pohle | 2023-01-20 00:42:58 +0100 |
---|---|---|
committer | Max Christian Pohle | 2023-01-20 00:42:58 +0100 |
commit | 5ec73d44d6eddb9491311f633f4be6ef609768b6 (patch) | |
tree | 65202f3f49df82992bfc72443ebbe8455fb0a509 | |
parent | 5107a24190ebf257b8abe3bf959a0c1b1e032e53 (diff) | |
download | vim-5ec73d44d6eddb9491311f633f4be6ef609768b6.tar.bz2 vim-5ec73d44d6eddb9491311f633f4be6ef609768b6.zip |
qol improvements
-rw-r--r-- | .gitmodules | 6 | ||||
-rw-r--r-- | after/ftplugin/javascript.vim | 2 | ||||
-rw-r--r-- | init.lua | 38 | ||||
m--------- | pack/all/start/fzf.vim | 0 | ||||
m--------- | pack/all/start/vim-recently-used | 0 | ||||
m--------- | pack/nvim/start/nvim-treesitter | 0 | ||||
-rw-r--r-- | plugin/max-fix-colorschemes.vim | 30 | ||||
-rw-r--r-- | utils/bashrc | 16 | ||||
-rw-r--r-- | vimrc-common | 19 |
9 files changed, 90 insertions, 21 deletions
diff --git a/.gitmodules b/.gitmodules index d09951e..986283d 100644 --- a/.gitmodules +++ b/.gitmodules | |||
@@ -55,3 +55,9 @@ | |||
55 | [submodule "pack/all/start/vim-editorconfig"] | 55 | [submodule "pack/all/start/vim-editorconfig"] |
56 | path = pack/all/start/vim-editorconfig | 56 | path = pack/all/start/vim-editorconfig |
57 | url = https://github.com/cxw42/editorconfig-vim | 57 | url = https://github.com/cxw42/editorconfig-vim |
58 | [submodule "pack/nvim/start/nvim-treesitter"] | ||
59 | path = pack/nvim/start/nvim-treesitter | ||
60 | url = https://github.com/nvim-treesitter/nvim-treesitter | ||
61 | [submodule "pack/all/start/fzf.vim"] | ||
62 | path = pack/all/start/fzf.vim | ||
63 | url = https://github.com/junegunn/fzf.vim | ||
diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim index d4c9199..ce0e6f2 100644 --- a/after/ftplugin/javascript.vim +++ b/after/ftplugin/javascript.vim | |||
@@ -1 +1 @@ | |||
set number | " set number | ||
@@ -3,6 +3,12 @@ vim.cmd('source ~/.vim/vimrc') | |||
3 | vim.o.termguicolors = true | 3 | vim.o.termguicolors = true |
4 | vim.o.exrc = true | 4 | vim.o.exrc = true |
5 | 5 | ||
6 | vim.o.shadafile = (os.getenv("XDG_CACHE_HOME") or | ||
7 | os.getenv("HOME") .. "/.cache" | ||
8 | ) .. "/vim.shada" | ||
9 | |||
10 | -- vimscript: get(environ(), "XDG_CACHE_HOME", "~/.cache")."/vim.shada" | ||
11 | |||
6 | require'man' | 12 | require'man' |
7 | 13 | ||
8 | require'colorizer'.setup() | 14 | require'colorizer'.setup() |
@@ -175,4 +181,34 @@ sources = cmp.config.sources({ | |||
175 | -- require'lspconfig'.html.setup{capabilities = capabilities} | 181 | -- require'lspconfig'.html.setup{capabilities = capabilities} |
176 | -- | 182 | -- |
177 | -- require'lspconfig'.jsonls.setup{capabilities = capabilities} | 183 | -- require'lspconfig'.jsonls.setup{capabilities = capabilities} |
178 | -- | 184 | -- |
185 | |||
186 | |||
187 | require'nvim-treesitter.configs'.setup { | ||
188 | -- A list of parser names, or "all" | ||
189 | ensure_installed = { "c", "bash", "javascript" }, | ||
190 | |||
191 | -- Install parsers synchronously (only applied to `ensure_installed`) | ||
192 | sync_install = false, | ||
193 | |||
194 | -- Automatically install missing parsers when entering buffer | ||
195 | -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally | ||
196 | auto_install = true, | ||
197 | |||
198 | -- List of parsers to ignore installing (for "all") | ||
199 | ignore_install = { "javascript" }, | ||
200 | |||
201 | ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) | ||
202 | -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! | ||
203 | |||
204 | highlight = { | ||
205 | -- `false` will disable the whole extension | ||
206 | enable = true, | ||
207 | |||
208 | -- Setting this to true will run `:h syntax` and tree-sitter at the same time. | ||
209 | -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). | ||
210 | -- Using this option may slow down your editor, and you may see some duplicate highlights. | ||
211 | -- Instead of true it can also be a list of languages | ||
212 | additional_vim_regex_highlighting = false, | ||
213 | }, | ||
214 | } | ||
diff --git a/pack/all/start/fzf.vim b/pack/all/start/fzf.vim new file mode 160000 | |||
Subproject 0f03107bc94b31a9c7adcee6da8e5de7492e4b0 | |||
diff --git a/pack/all/start/vim-recently-used b/pack/all/start/vim-recently-used | |||
Subproject b0762c939a9c1cd1e8e8d88d3491c28d556e993 | Subproject 7845fa4e392e8808693096329bf3638e3231186 | ||
diff --git a/pack/nvim/start/nvim-treesitter b/pack/nvim/start/nvim-treesitter new file mode 160000 | |||
Subproject 68e8181dbcf29330716d380e5669f2cd838eadb | |||
diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim index 0a5e401..9f55fdf 100644 --- a/plugin/max-fix-colorschemes.vim +++ b/plugin/max-fix-colorschemes.vim | |||
@@ -15,18 +15,24 @@ function! ExtendColorTheme() | |||
15 | highlight! PmenuThumb cterm=inverse | 15 | highlight! PmenuThumb cterm=inverse |
16 | highlight! MoreMsg cterm=inverse | 16 | highlight! MoreMsg cterm=inverse |
17 | 17 | ||
18 | highlight! link qfSeparator Normal | " reserve one space | 18 | highlight! link qfSeparator Normal | " reserve one space |
19 | highlight! link qfLineNr Normal | " informational line numbers should look different | 19 | highlight! link qfLineNr Normal | " informational line numbers should look different |
20 | highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing | 20 | highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing |
21 | highlight! link WildMenu Search | 21 | highlight! link WildMenu Search |
22 | highlight! link Convention Error | 22 | highlight! link Convention Error |
23 | highlight! link PmenuSbar Pmenu | 23 | highlight! link PmenuSbar Pmenu |
24 | highlight! link VertSplit LineNr | 24 | highlight! link VertSplit LineNr |
25 | highlight! link SignColumn LineNr | 25 | highlight! link SignColumn LineNr |
26 | highlight! link ALEErrorSign LineNr | 26 | highlight! link ALEErrorSign LineNr |
27 | highlight! link FoldColumn VertSplit | 27 | highlight! link FoldColumn VertSplit |
28 | " highlight! link Folded LineNr | 28 | highlight! link Folded LineNr |
29 | highlight! link EndOfBuffer NonText | 29 | highlight! link EndOfBuffer NonText |
30 | highlight! link DiagnosticHint Debug | ||
31 | highlight! link DiagnosticInfo Debug | ||
32 | highlight! link DiagnosticError Error | ||
33 | highlight! link DiagnosticWarn Debug | ||
34 | |||
35 | |||
30 | hi Comment gui=italic | 36 | hi Comment gui=italic |
31 | hi Keyword gui=bold | 37 | hi Keyword gui=bold |
32 | 38 | ||
diff --git a/utils/bashrc b/utils/bashrc index 24c51a0..f0ee98b 100644 --- a/utils/bashrc +++ b/utils/bashrc | |||
@@ -28,3 +28,19 @@ git config --global --replace-all core.pager 'vim -c":set noswapfile filetype=gi | |||
28 | # export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" | 28 | # export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" |
29 | 29 | ||
30 | # --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A | 30 | # --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A |
31 | |||
32 | function vim() { | ||
33 | SERVER=$(ls -tr "$XDG_RUNTIME_DIR"/nvim.* | tail -n1) | ||
34 | if [ $# -gt 0 ] && [ -n "$SERVER" ]; then | ||
35 | for i in "$@"; do | ||
36 | NEXT=$(realpath "$i") | ||
37 | nvim --server "$SERVER" --remote-silent "$NEXT" | ||
38 | done | ||
39 | else | ||
40 | nvim $@ | ||
41 | fi | ||
42 | |||
43 | } | ||
44 | |||
45 | |||
46 | |||
diff --git a/vimrc-common b/vimrc-common index 03daedd..f650dad 100644 --- a/vimrc-common +++ b/vimrc-common | |||
@@ -16,7 +16,7 @@ set noexrc | " exrc was nice, but has too many se | |||
16 | set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig) | 16 | set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig) |
17 | set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc | 17 | set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc |
18 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against | 18 | set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against |
19 | set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis | 19 | set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis |
20 | set ignorecase smartcase | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower) | 20 | set ignorecase smartcase | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower) |
21 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) | 21 | set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) |
22 | " set cindent cinoptions+=(0 | " indent at parentheses | 22 | " set cindent cinoptions+=(0 | " indent at parentheses |
@@ -105,7 +105,7 @@ end | |||
105 | " SETTINGS: | 105 | " SETTINGS: |
106 | " ====================================================================================================================== | 106 | " ====================================================================================================================== |
107 | set breakindent | " Every wrapped line will continue visually indented | 107 | set breakindent | " Every wrapped line will continue visually indented |
108 | " set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 108 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
109 | set concealcursor=nc | " limits the display of concealed text to normal and command mode | 109 | set concealcursor=nc | " limits the display of concealed text to normal and command mode |
110 | set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) | 110 | set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) |
111 | set confirm | " asks 'do you want to save?' | 111 | set confirm | " asks 'do you want to save?' |
@@ -124,11 +124,16 @@ if has('nvim') " Neovim? | |||
124 | endif | 124 | endif |
125 | 125 | ||
126 | if exists("g:neovide") | 126 | if exists("g:neovide") |
127 | set guifont=monospace:h11:b | 127 | set guifont=monospace:h11:b |
128 | let g:neovide_cursor_animation_length=0.03 | 128 | let g:neovide_cursor_animation_length=0 |
129 | let g:neovide_cursor_trail_size=0.8 | 129 | let g:neovide_scroll_animation_length = 0.5 |
130 | let g:neovide_scroll_animation_length = 0.05 | 130 | let g:neovide_cursor_trail_size=0.8 |
131 | let g:neovide_transparency = 0.9 | 131 | let g:neovide_cursor_vfx_mode = "" |
132 | let g:neovide_transparency = 0.9 | ||
133 | let g:neovide_floating_blur_amount_x = 4.0 | ||
134 | let g:neovide_floating_blur_amount_y = 4.0 | ||
135 | let g:neovide_background_color = '#383a62' | ||
136 | let g:neovide_scale_factor = 1.0 | ||
132 | endif | 137 | endif |
133 | 138 | ||
134 | set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for | 139 | set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for |