From f456d790b007c3841549ec35a996483135cceec3 Mon Sep 17 00:00:00 2001 From: gxlin Date: Wed, 16 Jun 2021 00:55:31 +0800 Subject: Add vim-godot plug --- .vim/plugins/lsp.vim | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .vim/plugins/lsp.vim (limited to '.vim/plugins/lsp.vim') diff --git a/.vim/plugins/lsp.vim b/.vim/plugins/lsp.vim deleted file mode 100644 index 1a5704b..0000000 --- a/.vim/plugins/lsp.vim +++ /dev/null @@ -1,39 +0,0 @@ -Plug 'prabirshrestha/vim-lsp' - -if executable('gopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gopls', - \ 'cmd': {server_info->['gopls']}, - \ 'allowlist': ['go'], - \ }) -endif - -function! s:on_lsp_buffer_enabled() abort - setlocal omnifunc=lsp#complete - setlocal signcolumn=no - if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif - nmap gd (lsp-definition) - nmap gs (lsp-document-symbol-search) - nmap gS (lsp-workspace-symbol-search) - nmap gr (lsp-references) - nmap gi (lsp-implementation) - nmap gt (lsp-type-definition) - nmap rn (lsp-rename) - nmap [g (lsp-previous-diagnostic) - nmap ]g (lsp-next-diagnostic) - nmap K (lsp-hover) - inoremap lsp#scroll(+4) - inoremap lsp#scroll(-4) - - let g:lsp_format_sync_timeout = 1000 - autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') - - " refer to doc to add more commands -endfunction - -augroup lsp_install - au! - " call s:on_lsp_buffer_enabled only for languages that has the server registered. - autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() -augroup END - -- cgit v1.2.3