diff options
author | Guangxiong Lin <[email protected]> | 2023-11-17 00:40:12 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2023-11-17 00:40:12 +0800 |
commit | 49b33aeaede7e77b084696cbc286b69260845542 (patch) | |
tree | fc66aea0cca67281815ed9cce97c74a2e9810dec | |
parent | 39c8b27c342442e585e0729982bdb82a95bc2e6c (diff) | |
download | dotfiles-49b33aeaede7e77b084696cbc286b69260845542.tar.gz dotfiles-49b33aeaede7e77b084696cbc286b69260845542.tar.bz2 dotfiles-49b33aeaede7e77b084696cbc286b69260845542.zip |
Update config on ruby and tags
-rw-r--r-- | .vim/after/ftplugin/ruby.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/cscope.vim | 22 | ||||
-rw-r--r-- | .vim/after/plugin/gutentags.vim | 20 | ||||
-rw-r--r-- | .vim/after/plugin/lsp.vim | 11 | ||||
-rw-r--r-- | .vim/after/plugin/minpac.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/ruby.vim | 10 | ||||
-rw-r--r-- | .vimrc | 3 |
7 files changed, 22 insertions, 46 deletions
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 <leader>css :cs find s <C-R>=expand("<cword>")<CR><CR> -nmap <leader>csg :cs find g <C-R>=expand("<cword>")<CR><CR> -nmap <leader>csc :cs find c <C-R>=expand("<cword>")<CR><CR> +nmap <leader>csg :cs find g <C-R>=expand("<cword>")<CR> +nmap <leader>csc :cs find c <C-R>=expand("<cword>")<CR> nmap <leader>cst :cs find t <C-R>=expand("<cword>")<CR><CR> nmap <leader>cse :cs find e <C-R>=expand("<cword>")<CR><CR> nmap <leader>csf :cs find f <C-R>=expand("<cfile>")<CR><CR> nmap <leader>csi :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR> -nmap <leader>csd :cs find d <C-R>=expand("<cword>")<CR><CR> -nmap <leader>csa :cs find a <C-R>=expand("<cword>")<CR><CR> +nmap <leader>csd :cs find d <C-R>=expand("<cword>")<CR> +nmap <leader>csa :cs find a <C-R>=expand("<cword>")<CR> nmap <leader>cs<space> :cs find<space> + +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 @@ -134,9 +134,6 @@ set directory=~/.vim/.swp// " tags set tags=./.tags;,.tags -if executable('gtags-cscope') - let &csprg='gtags-cscope' -endif " mapping let mapleader=',' |