summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plug-config/vim-lsp.vim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/plug-config/vim-lsp.vim')
-rw-r--r--.config/nvim/plug-config/vim-lsp.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/plug-config/vim-lsp.vim b/.config/nvim/plug-config/vim-lsp.vim
index 03c9d82..fb0d055 100644
--- a/.config/nvim/plug-config/vim-lsp.vim
+++ b/.config/nvim/plug-config/vim-lsp.vim
@@ -21,6 +21,19 @@ highlight LspWarningHighlight cterm=underline gui=underline ctermfg=DarkRed guif
highlight LspInformationHighlight cterm=underline gui=underline ctermfg=Green guifg=Green
highlight LspHintHighlight term=italic cterm=italic gui=italic ctermfg=Green guifg=Green
+augroup LspGo
+ au!
+ autocmd User lsp_setup call lsp#register_server({
+ \ 'name': 'go-lang',
+ \ 'cmd': {server_info->['gopls']},
+ \ 'whitelist': ['go'],
+ \ })
+ autocmd FileType go setlocal omnifunc=lsp#complete
+ "autocmd FileType go nmap <buffer> gd <plug>(lsp-definition)
+ "autocmd FileType go nmap <buffer> ,n <plug>(lsp-next-error)
+ "autocmd FileType go nmap <buffer> ,p <plug>(lsp-previous-error)
+augroup END
+
let g:lsp_signs_priority = 10
let g:lsp_textprop_enabled = 1
let g:lsp_cxx_hl_use_text_props = 1