parent
6693029e0c
commit
5b13d27758
5 changed files with 39 additions and 22 deletions
@ -0,0 +1,26 @@ |
|||||||
|
" Check that we are running inside nvim |
||||||
|
if !has('nvim') |
||||||
|
finish |
||||||
|
endif |
||||||
|
|
||||||
|
lua <<EOF |
||||||
|
-- Go Language Server |
||||||
|
require'nvim_lsp'.gopls.setup{} |
||||||
|
-- Vim Language Server |
||||||
|
require'nvim_lsp'.vimls.setup{} |
||||||
|
EOF |
||||||
|
|
||||||
|
function! s:ConfigureBuffer() |
||||||
|
nnoremap <buffer> <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR> |
||||||
|
nnoremap <buffer> <silent> <Leader>ld <cmd>lua vim.lsp.util.show_line_diagnostics()<CR> |
||||||
|
nnoremap <buffer> <silent> K <cmd>lua vim.lsp.buf.hover()<CR> |
||||||
|
nnoremap <buffer> <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR> |
||||||
|
endfunction |
||||||
|
|
||||||
|
if has('autocmd') |
||||||
|
augroup JHLanguageClientAutocmds |
||||||
|
autocmd! |
||||||
|
autocmd FileType go,vim call s:ConfigureBuffer() |
||||||
|
augroup END |
||||||
|
endif |
||||||
|
|
@ -0,0 +1 @@ |
|||||||
|
Subproject commit 4fd2507dd295d9c114febabb0c9cf31da87df008 |
@ -0,0 +1 @@ |
|||||||
|
Subproject commit 784794dd8854b1eee2a9e718b8b1d941a20516b6 |
Loading…
Reference in new issue