summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-07-11 10:42:46 -0500
committerMarc Coquand <marc@mccd.space>2024-07-11 10:42:46 -0500
commit1ea5c2aed8d14f1c7b57f8c017fe7500a86f6859 (patch)
tree2f6cc38339beee3a61313ab7cd8729cc038806d6
parent6b4c0820f976fc3a265f6e9e413a6f65f4aa2152 (diff)
downloadopenbsd-1ea5c2aed8d14f1c7b57f8c017fe7500a86f6859.tar.gz
openbsd-1ea5c2aed8d14f1c7b57f8c017fe7500a86f6859.tar.bz2
openbsd-1ea5c2aed8d14f1c7b57f8c017fe7500a86f6859.zip
vim: update patterns
-rw-r--r--vimrc32
1 files changed, 23 insertions, 9 deletions
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 = "\<Esc>[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 <buffer> :LspFormat
+"autocmd Filetype ocaml autocmd BufWritePre <buffer> :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 <buffer> :LspFormat
@@ -155,7 +156,7 @@ autocmd Filetype markdown setlocal spell
" Keybindings
let mapleader=" "
noremap , :
-noremap <leader>e :e **/
+noremap <leader>e :e! **/*
noremap <silent> gd mB:LspGotoDefinition<Enter>
noremap <silent> ]d :LspDiagNext<Enter>
noremap <silent> [d :LspDiagPrev<Enter>
@@ -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}\@<!.go normal! mA
+augroup END
+