From 8becf822b792ad5456084c6ddf51f0c70084434d Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 12 Dec 2021 14:40:48 +0800 Subject: Purge vim-lsp --- .vim/plugin/lsp.vim | 46 ---------------------------------------------- bin/vim-pack | 1 - 2 files changed, 47 deletions(-) delete mode 100644 .vim/plugin/lsp.vim diff --git a/.vim/plugin/lsp.vim b/.vim/plugin/lsp.vim deleted file mode 100644 index cc40ee6..0000000 --- a/.vim/plugin/lsp.vim +++ /dev/null @@ -1,46 +0,0 @@ -if executable('gopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gopls', - \ 'cmd': {server_info->['gopls']}, - \ 'allowlist': ['go'], - \ }) -endif -if executable('ccls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'ccls', - \ 'cmd': {server_info->['ccls']}, - \ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'compile_commands.json'))}, - \ 'initialization_options': {'cache': {'directory': expand('~/.cache/ccls') }}, - \ 'allowlist': ['c', 'cpp', 'objc', 'objcpp', 'cc'], - \ }) -endif - -function! s:on_lsp_buffer_enabled() abort - setlocal omnifunc=lsp#complete - 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 - -let g:lsp_settings_filetype_lua = 'sumneko-lua-language-server' diff --git a/bin/vim-pack b/bin/vim-pack index f03cfa0..472a9e1 100755 --- a/bin/vim-pack +++ b/bin/vim-pack @@ -64,7 +64,6 @@ update_package 'fzf.vim' 'git@github.com:junegunn/fzf.vim.git' update_package 'ultisnips' 'git@github.com:SirVer/ultisnips.git' update_package 'vim-snippets' 'git@github.com:honza/vim-snippets.git' update_package 'onedark.vim' 'git@github.com:joshdick/onedark.vim.git' 'opt' -update_package vim-lsp git@github.com:prabirshrestha/vim-lsp.git update_package undotree git@github.com:mbbill/undotree.git update_package ale git@github.com:dense-analysis/ale.git update_package vim-eunuch git@github.com:tpope/vim-eunuch.git -- cgit v1.2.3