more vim-lsp tweaks

Fri, 09 Jul 2021 00:58:36 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 09 Jul 2021 00:58:36 -0500
changeset 926
9871d921c95d
parent 925
b5875260619a
child 927
6cdcce4f0abd

more vim-lsp tweaks

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -121,6 +121,9 @@ noremap <silent> <leader>a :call vimrc#A
 " Maps that only apply when an LSP is available
 func! s:on_lsp_buffer_enabled() abort
   setl omnifunc=lsp#complete
+  if exists('+tagfunc')
+    setl tagfunc=lsp#tagfunc
+  endif
   nmap <buffer> K          <plug>(lsp-hover)
   nmap <buffer> gd         <plug>(lsp-definition)
   nmap <buffer> gr         <plug>(lsp-references)
@@ -131,6 +134,8 @@ func! s:on_lsp_buffer_enabled() abort
   nmap <buffer> [r         <plug>(lsp-previous-reference)
   nmap <buffer> <leader>rn <plug>(lsp-rename)
   nmap <buffer> <leader>gt <plug>(lsp-type-definition)
+  let &signcolumn = (has('gui_running') ? 'number' : 'yes')
+  hi lspReference ctermfg=217 guifg=#f0a0c0
 endfunc
 
 " Commands & Aliases  {{{
@@ -372,8 +377,6 @@ func! s:on_lsp_float_opened() abort
   call win_execute(popup_list()[0], 'setl sbr=NONE nobri linebreak')
 endfunc
 
-hi lspReference ctermfg=217 guifg=#f0a0c0
-
 let g:lsp_settings = {
   \ 'gopls': {
     \ 'workspace_config': { 'gopls': { 'gofumpt': v:true } },

mercurial