aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vim/plugin/lsp.vim46
-rwxr-xr-xbin/vim-pack1
2 files changed, 0 insertions, 47 deletions
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 <buffer> gd <plug>(lsp-definition)
- nmap <buffer> gs <plug>(lsp-document-symbol-search)
- nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
- nmap <buffer> gr <plug>(lsp-references)
- nmap <buffer> gi <plug>(lsp-implementation)
- nmap <buffer> gt <plug>(lsp-type-definition)
- nmap <buffer> <leader>rn <plug>(lsp-rename)
- nmap <buffer> [g <plug>(lsp-previous-diagnostic)
- nmap <buffer> ]g <plug>(lsp-next-diagnostic)
- nmap <buffer> K <plug>(lsp-hover)
- inoremap <buffer> <expr><c-f> lsp#scroll(+4)
- inoremap <buffer> <expr><c-d> 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' '[email protected]:junegunn/fzf.vim.git'
update_package 'ultisnips' '[email protected]:SirVer/ultisnips.git'
update_package 'vim-snippets' '[email protected]:honza/vim-snippets.git'
update_package 'onedark.vim' '[email protected]:joshdick/onedark.vim.git' 'opt'
-update_package vim-lsp [email protected]:prabirshrestha/vim-lsp.git
update_package undotree [email protected]:mbbill/undotree.git
update_package ale [email protected]:dense-analysis/ale.git
update_package vim-eunuch [email protected]:tpope/vim-eunuch.git