diff --git a/nvim/autoload/airline/extensions/dotfiles_tweaks.vim b/nvim/autoload/airline/extensions/dotfiles_tweaks.vim index ee76228..d1822a3 100644 --- a/nvim/autoload/airline/extensions/dotfiles_tweaks.vim +++ b/nvim/autoload/airline/extensions/dotfiles_tweaks.vim @@ -1,7 +1,11 @@ function! airline#extensions#dotfiles_tweaks#init(ext) abort " Undo this commit a little bit: " - " Most of the hacks present here are not required anymore: - " - call airline#parts#define_accent('colnr', 'none') + call airline#parts#define('maxlinenr', { + \ 'raw': trim(airline#parts#get('maxlinenr').raw), + \ }) + call airline#parts#define('colnr', { + \ 'raw': trim(airline#parts#get('colnr').raw), + \ 'accent': 'none', + \ }) endfunction diff --git a/nvim/coc-languages/c.vim b/nvim/coc-languages/c.vim index 6b3e983..dab445e 100644 --- a/nvim/coc-languages/c.vim +++ b/nvim/coc-languages/c.vim @@ -6,7 +6,9 @@ let g:coc_user_config['languageserver.ccls'] = { \ 'command': 'ccls', \ 'rootPatterns': ['.ccls', 'compile_commands.json', '.vim/', '.git/', '.hg/'], \ 'initializationOptions': { -\ 'cache.directory': tempname(), +\ 'cache': { +\ 'directory': '/tmp/ccls', +\ }, \ }, \ } diff --git a/nvim/coc-languages/vim.vim b/nvim/coc-languages/vim.vim deleted file mode 100644 index c9c0898..0000000 --- a/nvim/coc-languages/vim.vim +++ /dev/null @@ -1,52 +0,0 @@ -let s:filetypes = ['vim'] -let g:coc_filetypes += s:filetypes - -let g:coc_global_extensions += ['coc-vimlsp'] -let g:coc_user_config['vimlsp'] = { -\ 'suggest.fromRuntimepath': v:true, -\ } - -" The coc-vimlsp plugin is basically reimplemented here because it doesn't do -" much beyond just wrapping the language server and passing some init options, -" but having two processes (plugin+LSP) almost doubles the memory usage. -" -" On a second thought... Apparently that's just how this extension works... -" Either way it spawns two processes (with the controller process having -" roughly the same memory usage regardless of being in a coc extension). And -" having updates through :CocUpdate is nice, so I'm gonna use the coc-vimlsp -" plugin itself. The janky reimplementation is left in this file for better -" times and bragging purposes. -finish - -" -" workspace.isNvim: -let g:coc_user_config['languageserver.vimls'] = { -\ 'filetypes': s:filetypes, -\ 'command': 'vim-language-server', -\ 'args': ['--stdio'], -\ 'initializationOptions': { -\ 'isNeovim': has('nvim'), -\ 'iskeyword': &iskeyword, -\ 'vimruntime': $VIMRUNTIME, -\ 'runtimepath': &runtimepath, -\ 'suggest.fromRuntimepath': v:true, -\ }, -\ } - -augroup dotfiles-coc-vimls - autocmd! - - " NOTE: Apparently delaying runtimepath initialization even until VimEnter - " is not enough, as coc-snippets adds its plugin to rtp during coc - " intialization phase which happens sometime after VimEnter[1]. Although, - " judging by the coc source code, custom language servers are initialized - " just before activation of extensions[2], and coc-snippets adds its plugin - " to rtp in the activation phase[3], so this might be reasonable for us. - " [1]: - " [2]: - " [3]: - autocmd VimEnter * let g:coc_user_config['languageserver.vimls.initializationOptions.runtimepath'] = &runtimepath - - autocmd User CocNvimInit call CocNotify('vimls', '$/change/iskeyword', &iskeyword) - autocmd OptionSet iskeyword call CocNotify('vimls', '$/change/iskeyword', v:option_new) -augroup END diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index a294e71..5a81cec 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -60,7 +60,7 @@ set commentstring=//%s " Wrapping {{{ - set nowrap colorcolumn=81,101,121 textwidth=79 + set nowrap colorcolumn=81,101,121 " }}} @@ -203,12 +203,10 @@ set commentstring=//%s " Formatting {{{ - " -o: don't insert a comment after hitting 'o' or 'O' in the Normal mode - " -t: don't auto-wrap regular code while typing - " -c: don't auto-wrap comments while typing + " don't insert a comment after hitting 'o' or 'O' in the Normal mode augroup vimrc-editing-formatting autocmd! - autocmd FileType * set formatoptions-=o | set formatoptions-=t | set formatoptions-=c + autocmd FileType * set formatoptions-=o augroup END " }}} diff --git a/nvim/plugin/interface.vim b/nvim/plugin/interface.vim index 082f3b4..975c079 100644 --- a/nvim/plugin/interface.vim +++ b/nvim/plugin/interface.vim @@ -92,8 +92,8 @@ endif let g:airline_symbols = { \ 'readonly': 'RO', \ 'whitespace': '', - \ 'colnr': ' :', - \ 'linenr': ' :', + \ 'colnr': '', + \ 'linenr': '', \ 'maxlinenr': ' ', \ 'branch': '', \ 'notexists': ' [?]',