Skip to content

Instantly share code, notes, and snippets.

@lysenko-sergey-developer
Created April 22, 2021 12:07
Show Gist options
  • Save lysenko-sergey-developer/e65cc93a70ca88da3af72b32b15d1f12 to your computer and use it in GitHub Desktop.
Save lysenko-sergey-developer/e65cc93a70ca88da3af72b32b15d1f12 to your computer and use it in GitHub Desktop.
Ctags setup for nvim
""""""""""""""""""""""""""""""
" => Vim Tags
""""""""""""""""""""""""""""""
let g:gutentags_add_default_project_roots = 0
let g:gutentags_project_root = ['package.json', '.git']
let g:gutentags_cache_dir = expand('~/.config/nvim/tags')
command! -nargs=0 GutentagsClearCache call system('rm ' . g:gutentags_cache_dir . '/*')
let g:gutentags_generate_on_new = 1
let g:gutentags_generate_on_missing = 1
let g:gutentags_generate_on_write = 1
let g:gutentags_generate_on_empty_buffer = 0
let g:gutentags_ctags_extra_args = [
\ '--tag-relative=yes',
\ '--fields=+ailmnS',
\ ]
let g:gutentags_ctags_exclude = [
\ '*.git', '*.hg',
\ '*/tests/*',
\ 'build',
\ 'dist',
\ '*sites/*/files/*',
\ 'bin',
\ 'node_modules',
\ 'bower_components',
\ 'cache',
\ 'compiled',
\ 'docs',
\ 'example',
\ 'bundle',
\ 'vendor',
\ '*.md',
\ '*-lock.json',
\ '*.lock',
\ '*bundle*.js',
\ '*build*.js',
\ '.*rc*',
\ '*.json',
\ '*.min.*',
\ '*.map',
\ '*.bak',
\ '*.zip',
\ '*.pyc',
\ '*.class',
\ '*.sln',
\ '*.Master',
\ '*.csproj',
\ '*.tmp',
\ '*.csproj.user',
\ '*.cache',
\ '*.pdb',
\ 'tags*',
\ 'cscope.*',
\ '*.less',
\ '*.exe', '*.dll',
\ '*.mp3', '*.ogg', '*.flac',
\ '*.swp', '*.swo',
\ '*.bmp', '*.gif', '*.ico', '*.jpg', '*.png',
\ '*.rar', '*.zip', '*.tar', '*.tar.gz', '*.tar.xz', '*.tar.bz2',
\ '*.pdf', '*.doc', '*.docx', '*.ppt', '*.pptx',
\ ]
""""""""""""""""""""""""""""""
@huangyingjie
Copy link

`command! -nargs=0 GutentagsClearCache
what's this?

@lysenko-sergey-developer
Copy link
Author

@lysenko-sergey-developer
Copy link
Author

I hope it will help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment