From cd8cf9aa44f4ea6c974519a71dcbe48256d17ee1 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Tue, 22 Feb 2022 10:20:33 +0100 Subject: [PATCH] [vim] update conf and ignore spelling dictionaries --- vim/.vim/coc-settings.json | 2 ++ vim/.vim/spell/fr.utf-8.add | 12 ------------ vim/.vim/spell/fr.utf-8.add.spl | Bin 200 -> 0 bytes vim/.vimrc | 27 ++++++++++++++++++++++----- 4 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 vim/.vim/spell/fr.utf-8.add delete mode 100644 vim/.vim/spell/fr.utf-8.add.spl diff --git a/vim/.vim/coc-settings.json b/vim/.vim/coc-settings.json index cbac8e1..76b801f 100644 --- a/vim/.vim/coc-settings.json +++ b/vim/.vim/coc-settings.json @@ -1,4 +1,6 @@ { + "suggest.noselect": false, + "languageserver": { "golang": { "command": "gopls", diff --git a/vim/.vim/spell/fr.utf-8.add b/vim/.vim/spell/fr.utf-8.add deleted file mode 100644 index 1ee8dd6..0000000 --- a/vim/.vim/spell/fr.utf-8.add +++ /dev/null @@ -1,12 +0,0 @@ -SQLite -MySQL -PostgreSQL -Gateway -Waarp -HTTP -HTTPS -R66 -REST -JSON -SFTP -bug diff --git a/vim/.vim/spell/fr.utf-8.add.spl b/vim/.vim/spell/fr.utf-8.add.spl deleted file mode 100644 index da9665f8b1fac51f42c933233d5f9a2621a0b01e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmWIZ^erw(&B-zP&%nTt%9)g&k(FCeR9wzj%9zf`z?jHb!kEff&X~wp$;iaSSi)Gs zSir=@Qq0K2!dT3h&&bHYpq|HA$ym%-$e6>()WDd}SjHn8TO}VVkEiCNd^M^vD!2Ffgbv`vwFvRx$=N1~U3EGN78umI@Yy K>g7pg0098%(IXfD diff --git a/vim/.vimrc b/vim/.vimrc index 37a24ba..1324141 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -12,6 +12,9 @@ set background=dark let g:solarized_termcolors = 16 let g:solarized_hitrail=1 colorscheme solarized +if !empty($TMUX) + set termguicolors +endif " have Vim load indentation rules and plugins " according to the detected filetype. @@ -91,8 +94,17 @@ let g:airline#extensions#tabline#enabled = 1 " Vim-go options "let g:go_fmt_command = "goimports" let g:go_fmt_command = "gopls" -let g:go_gopls_gofumpt=1 +let g:go_imports_mode = 'gopls' let g:go_fmt_autosave = 1 + +" gopls settings +let g:go_gopls_gofumpt = 1 +let g:go_gopls_staticcheck = 1 +let g:go_gopls_analyses = 1 +let g:go_gopls_complete_unimported = 1 +let g:go_gopls_matcher = 'fuzzy' +let g:go_gopls_use_placeholders = 1 + let g:go_metalinter_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint'] let g:go_metalinter_autosave = 0 "let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck'] @@ -123,7 +135,7 @@ let g:go_test_show_name = 1 let g:go_test_timeout= '60s' let g:go_auto_type_info = 1 let g:go_jump_to_error = 0 -let g:go_auto_sameids = 0 +let g:go_auto_sameids = 1 " vimwiki options let g:vimwiki_list = [{'path': '~/Notebook', @@ -191,12 +203,14 @@ call plug#begin('~/.vim/plugged') Plug 'liuchengxu/vim-clap', { 'do': { -> clap#installer#force_download() } } Plug 'dense-analysis/ale' Plug 'joereynolds/vim-minisnip' + Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'nullvoxpopuli/coc-ember', {'do': 'yarn install --frozen-lockfile'} Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'} Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'} Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'} Plug 'neoclide/coc-java', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'} Plug 'aklt/plantuml-syntax' Plug 'scrooloose/vim-slumlord' @@ -274,21 +288,24 @@ endfunction " Use tab for trigger completion with characters ahead and navigate. inoremap - \ pumvisible() ? "\" : + \ pumvisible() ? coc#_select_confirm() : + \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : \ check_back_space() ? "\" : \ coc#refresh() -inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction +let g:coc_snippet_next = '' + " Use to confirm completion, `u` means break undo chain at current " position. Coc only does snippet and additional edit on confirm. if has('patch8.1.1068') " Use `complete_info` if your (Neo)Vim version supports it. - inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" + inoremap pumvisible() ? coc#_select_confirm() : + \"\u\\=coc#on_enter()\" else imap pumvisible() ? "\" : "\u\" endif