From 49b33aeaede7e77b084696cbc286b69260845542 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 17 Nov 2023 00:40:12 +0800 Subject: Update config on ruby and tags --- .vim/after/ftplugin/ruby.vim | 1 - .vim/after/plugin/cscope.vim | 22 +++++++++++++++++----- .vim/after/plugin/gutentags.vim | 20 -------------------- .vim/after/plugin/lsp.vim | 11 ----------- .vim/after/plugin/minpac.vim | 1 - .vim/after/plugin/ruby.vim | 10 +++++----- 6 files changed, 22 insertions(+), 43 deletions(-) delete mode 100644 .vim/after/plugin/gutentags.vim (limited to '.vim') diff --git a/.vim/after/ftplugin/ruby.vim b/.vim/after/ftplugin/ruby.vim index 50c0c61..e867f90 100644 --- a/.vim/after/ftplugin/ruby.vim +++ b/.vim/after/ftplugin/ruby.vim @@ -1,4 +1,3 @@ setlocal shiftwidth=2 setlocal softtabstop=2 setlocal foldmethod=indent -setlocal iskeyword+=!,? diff --git a/.vim/after/plugin/cscope.vim b/.vim/after/plugin/cscope.vim index b0c9392..a098e18 100644 --- a/.vim/after/plugin/cscope.vim +++ b/.vim/after/plugin/cscope.vim @@ -1,14 +1,26 @@ -set cscopequickfix=s-,c-,d-,i-,t-,e- +if executable('gtags-cscope') + let &csprg='gtags-cscope' +endif + +set cscopequickfix=g-,s-,c-,d-,i-,t-,e- set cscopetag +set cscoperelative nmap css :cs find s =expand("") -nmap csg :cs find g =expand("") -nmap csc :cs find c =expand("") +nmap csg :cs find g =expand("") +nmap csc :cs find c =expand("") nmap cst :cs find t =expand("") nmap cse :cs find e =expand("") nmap csf :cs find f =expand("") nmap csi :cs find i ^=expand("")$ -nmap csd :cs find d =expand("") -nmap csa :cs find a =expand("") +nmap csd :cs find d =expand("") +nmap csa :cs find a =expand("") nmap cs :cs find + +if has('cscope') + let tagfile = findfile("GTAGS", ".;") + if filereadable(tagfile) + exec "cs add" tagfile + endif +endif diff --git a/.vim/after/plugin/gutentags.vim b/.vim/after/plugin/gutentags.vim deleted file mode 100644 index 8e38294..0000000 --- a/.vim/after/plugin/gutentags.vim +++ /dev/null @@ -1,20 +0,0 @@ -let g:gutentags_project_root = ['.root', '.svn', '.git', '.hg', '.project'] -let g:gutentags_ctags_tagfile = '.tags' -let g:gutentags_cache_dir = expand('~/.cache/tags') -let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extras=+q'] -let g:gutentags_ctags_extra_args += ['--c++-kinds=+px'] -let g:gutentags_ctags_extra_args += ['--c-kinds=+px'] -let g:gutentags_ctags_extra_args += ['--output-format=e-ctags'] -let g:gutentags_define_advanced_commands = 1 - -let $GTAGSLABEL = 'native-pygments' - -let g:gutentags_modules = [] -if executable('ctags') - let g:gutentags_modules += ['ctags'] -endif -if executable('gtags') && executable('gtags-cscope') - let g:gutentags_modules += ['gtags_cscope'] -endif - -packadd vim-gutentags diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim index 445df77..be41ceb 100644 --- a/.vim/after/plugin/lsp.vim +++ b/.vim/after/plugin/lsp.vim @@ -57,17 +57,6 @@ if executable('godot') \ }) endif -if executable('solargraph') - au User lsp_setup call lsp#register_server({ - \ 'name': 'solargraph', - \ 'cmd': {server_info->['solargraph', 'stdio']}, - \ 'initialization_options': { - \ 'diagnostics': 'true' - \ }, - \ 'allowlist': ['ruby'], - \ }) -endif - " https://github.com/mickael-menu/zk " if executable('zk') " au User lsp_setup call lsp#register_server({ diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index c5aed00..ff31f80 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -38,7 +38,6 @@ function! InitMinpac() abort call minpac#add('https://github.com/prabirshrestha/asyncomplete-buffer.vim.git', {'type': 'opt'}) call minpac#add('https://github.com/yami-beta/asyncomplete-omni.vim', {'type': 'opt'}) - call minpac#add('https://github.com/ludovicchabant/vim-gutentags.git', {'type': 'opt'}) call minpac#add('https://github.com/easymotion/vim-easymotion.git', {'type': 'opt'}) call minpac#add('https://github.com/airblade/vim-rooter.git') call minpac#add('https://github.com/mbbill/undotree.git') diff --git a/.vim/after/plugin/ruby.vim b/.vim/after/plugin/ruby.vim index 5addcc4..1d1121c 100644 --- a/.vim/after/plugin/ruby.vim +++ b/.vim/after/plugin/ruby.vim @@ -1,5 +1,5 @@ -let g:rubycomplete_buffer_loading = 1 -let g:rubycomplete_classes_in_global = 1 -let g:rubycomplete_rails = 1 -let g:rubycomplete_load_gemfile = 1 -let g:rubycomplete_use_bundler = 1 +let g:rubycomplete_buffer_loading = 0 +let g:rubycomplete_classes_in_global = 0 +let g:rubycomplete_rails = 0 +let g:rubycomplete_load_gemfile = 0 +let g:rubycomplete_use_bundler = 0 -- cgit v1.2.3