aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2023-01-20 00:42:58 +0100
committerMax Christian Pohle2023-01-20 00:42:58 +0100
commit5ec73d44d6eddb9491311f633f4be6ef609768b6 (patch)
tree65202f3f49df82992bfc72443ebbe8455fb0a509
parent5107a24190ebf257b8abe3bf959a0c1b1e032e53 (diff)
downloadvim-5ec73d44d6eddb9491311f633f4be6ef609768b6.tar.bz2
vim-5ec73d44d6eddb9491311f633f4be6ef609768b6.zip
qol improvements
-rw-r--r--.gitmodules6
-rw-r--r--after/ftplugin/javascript.vim2
-rw-r--r--init.lua38
m---------pack/all/start/fzf.vim0
m---------pack/all/start/vim-recently-used0
m---------pack/nvim/start/nvim-treesitter0
-rw-r--r--plugin/max-fix-colorschemes.vim30
-rw-r--r--utils/bashrc16
-rw-r--r--vimrc-common19
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
diff --git a/init.lua b/init.lua
index 9cc1598..d58bbba 100644
--- a/init.lua
+++ b/init.lua
@@ -3,6 +3,12 @@ vim.cmd('source ~/.vim/vimrc')
3vim.o.termguicolors = true 3vim.o.termguicolors = true
4vim.o.exrc = true 4vim.o.exrc = true
5 5
6vim.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
6require'man' 12require'man'
7 13
8require'colorizer'.setup() 14require'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
187require'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
32function 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
16set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig) 16set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig)
17set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc 17set ts=4 sts=4 sw=4 expandtab textwidth=0 | " better done with a modeline or local exrc
18set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against 18set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
19set number norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis 19set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
20set 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) 20set 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)
21set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) 21set 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" ======================================================================================================================
107set breakindent | " Every wrapped line will continue visually indented 107set breakindent | " Every wrapped line will continue visually indented
108" set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) 108set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
109set concealcursor=nc | " limits the display of concealed text to normal and command mode 109set concealcursor=nc | " limits the display of concealed text to normal and command mode
110set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) 110set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX)
111set confirm | " asks 'do you want to save?' 111set confirm | " asks 'do you want to save?'
@@ -124,11 +124,16 @@ if has('nvim') " Neovim?
124endif 124endif
125 125
126if exists("g:neovide") 126if 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
132endif 137endif
133 138
134set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for 139set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
..