.vimrc

changeset 926
9871d921c95d
parent 925
b5875260619a
child 927
6cdcce4f0abd
equal deleted inserted replaced
925:b5875260619a 926:9871d921c95d
119 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR> 119 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR>
120 120
121 " Maps that only apply when an LSP is available 121 " Maps that only apply when an LSP is available
122 func! s:on_lsp_buffer_enabled() abort 122 func! s:on_lsp_buffer_enabled() abort
123 setl omnifunc=lsp#complete 123 setl omnifunc=lsp#complete
124 if exists('+tagfunc')
125 setl tagfunc=lsp#tagfunc
126 endif
124 nmap <buffer> K <plug>(lsp-hover) 127 nmap <buffer> K <plug>(lsp-hover)
125 nmap <buffer> gd <plug>(lsp-definition) 128 nmap <buffer> gd <plug>(lsp-definition)
126 nmap <buffer> gr <plug>(lsp-references) 129 nmap <buffer> gr <plug>(lsp-references)
127 nmap <buffer> gt <plug>(lsp-peek-type-definition) 130 nmap <buffer> gt <plug>(lsp-peek-type-definition)
128 nmap <buffer> ]d <plug>(lsp-next-diagnostic) 131 nmap <buffer> ]d <plug>(lsp-next-diagnostic)
129 nmap <buffer> [d <plug>(lsp-previous-diagnostic) 132 nmap <buffer> [d <plug>(lsp-previous-diagnostic)
130 nmap <buffer> ]r <plug>(lsp-next-reference) 133 nmap <buffer> ]r <plug>(lsp-next-reference)
131 nmap <buffer> [r <plug>(lsp-previous-reference) 134 nmap <buffer> [r <plug>(lsp-previous-reference)
132 nmap <buffer> <leader>rn <plug>(lsp-rename) 135 nmap <buffer> <leader>rn <plug>(lsp-rename)
133 nmap <buffer> <leader>gt <plug>(lsp-type-definition) 136 nmap <buffer> <leader>gt <plug>(lsp-type-definition)
137 let &signcolumn = (has('gui_running') ? 'number' : 'yes')
138 hi lspReference ctermfg=217 guifg=#f0a0c0
134 endfunc 139 endfunc
135 140
136 " Commands & Aliases {{{ 141 " Commands & Aliases {{{
137 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>) 142 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>)
138 143
369 augroup END 374 augroup END
370 375
371 func! s:on_lsp_float_opened() abort 376 func! s:on_lsp_float_opened() abort
372 call win_execute(popup_list()[0], 'setl sbr=NONE nobri linebreak') 377 call win_execute(popup_list()[0], 'setl sbr=NONE nobri linebreak')
373 endfunc 378 endfunc
374
375 hi lspReference ctermfg=217 guifg=#f0a0c0
376 379
377 let g:lsp_settings = { 380 let g:lsp_settings = {
378 \ 'gopls': { 381 \ 'gopls': {
379 \ 'workspace_config': { 'gopls': { 'gofumpt': v:true } }, 382 \ 'workspace_config': { 'gopls': { 'gofumpt': v:true } },
380 \ }, 383 \ },

mercurial