From 1ea5c2aed8d14f1c7b57f8c017fe7500a86f6859 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Thu, 11 Jul 2024 10:42:46 -0500 Subject: vim: update patterns --- vimrc | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index fe2691e..f127d51 100644 --- a/vimrc +++ b/vimrc @@ -14,16 +14,16 @@ set cindent " Theme syntax on set background=light -set rnu +set termguicolors colorscheme quiet set incsearch set matchpairs+=<:> -hi Normal ctermfg=black ctermbg=white +hi Normal guifg=black guibg=#FFFFEA "hi Keyword ctermfg=black cterm=bold -hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white -hi SpellCap term=reverse cterm=underline ctermfg=25 ctermbg=white -hi SpellRare term=reverse cterm=underline ctermfg=30 ctermbg=white -hi SpellLocal term=reverse cterm=underline ctermfg=90 ctermbg=white +hi SpellBad term=reverse term=underline guibg=#FFFFEA +hi SpellCap term=reverse term=underline guibg=#FFFFEA +hi SpellRare term=reverse term=underline guibg=#FFFFEA +hi SpellLocal term=reverse term=underline guibg=#FFFFEA " Cursor - switch between line and full let &t_SI = "\[6 q" @@ -48,7 +48,7 @@ packadd lsp if exists('g:loaded_lsp') call LspOptionsSet(#{ \ aleSupport: v:false, - \ autoComplete: v:false, + \ autoComplete: v:true, \ autoHighlight: v:false, \ autoHighlightDiags: v:true, \ autoPopulateDiags: v:true, @@ -103,7 +103,7 @@ if exists('g:loaded_lsp') \ syncInit: v:true \ }]) end -autocmd Filetype ocaml autocmd BufWritePre :LspFormat +"autocmd Filetype ocaml autocmd BufWritePre :LspFormat autocmd Filetype ocaml setlocal tabstop=2 autocmd Filetype ocaml setlocal shiftwidth=2 @@ -118,6 +118,7 @@ if exists('g:loaded_lsp') \ }]) end +autocmd FileType go setlocal omnifunc=lsp#complete autocmd Filetype go set makeprg=go\ build autocmd Filetype go autocmd BufWritePre :LspFormat @@ -155,7 +156,7 @@ autocmd Filetype markdown setlocal spell " Keybindings let mapleader=" " noremap , : -noremap e :e **/ +noremap e :e! **/* noremap gd mB:LspGotoDefinition noremap ]d :LspDiagNext noremap [d :LspDiagPrev @@ -181,3 +182,16 @@ set wildoptions+=fuzzy " Grep set grepprg=git\ grep\ -nH + +" Auto go to previous X +augroup VIMRC + autocmd! + autocmd BufLeave *.css,*.scss normal! mC + autocmd BufLeave *.html normal! mH + autocmd BufLeave *.js,*.ts normal! mJ + autocmd BufLeave *.md normal! mM + autocmd BufLeave *.yml,*.yaml normal! mY + autocmd BufLeave *_test.go normal! mT + autocmd BufLeave *{_test}\@