Linux

vim-gutentags 저장 시 오류

Segel 2022. 4. 24. 16:58

문제:
vim에서 저장( w) 명령을 내릴 때 vim-gutentags에서 다음과 같은 오류가 남;

Error detected while processing DirChanged Autocommands for "*":
E475: Invalid argument: Channel doesn't exist
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>75_nvim_job_exit_wrapper[1]..gutentags#ctags#on_job_exit[1]..gutentags#remove_job_by_data[2]..gutentags#remove_job:
line   22:
E171: Missing :endif



해결:

#for init.lua
vim.g["gutentags_add_default_project_roots"] = 0
vim.g["gutentags_project_root "] = {'package.json', '.git', '.hg', '.svn'}
vim.g["gutentags_cache_dir"] = vim.fn.expand('~/.gutentags_cache')
vim.g["gutentags_exclude_filetypes"] = {'gitcommit', 'gitconfig', 'gitrebase',
'gitsendemail', 'git'}
vim.g["gutentags_generate_on_new"] = 1
vim.g["gutentags_generate_on_missing"] = 1
vim.g["gutentags_generate_on_write"] = 1
vim.g["gutentags_generate_on_empty_buffer"] = 0
vim.g["gutentags_ctags_extra_args"] = {'--tag-relative=yes',
'--fields=+ailmnS'}
vim.g["gutentags_ctags_exclude"] = {'*.git', '*.svn', '*.hg','cache', 'build', 'dist', 'bin', 'node_modules', 'bower_components','*-lock.json',  '*.lock','*.min.*','*.bak','*.zip','*.pyc','*.class','*.sln','*.csproj', '*.csproj.user','*.tmp','*.cache','*.vscode','*.pdb','*.exe', '*.dll', '*.bin','*.mp3', '*.ogg', '*.flac','*.swp', '*.swo','.DS_Store', '*.plist','*.bmp', '*.gif', '*.ico', '*.jpg', '*.png', '*.svg','*.rar', '*.zip', '*.tar', '*.tar.gz', '*.tar.xz', '*.tar.bz2','*.pdf', '*.doc', '*.docx', '*.ppt', '*.pptx', '*.xls',}

#for init.vim
let g:gutentags_add_default_project_roots = 0
let g:gutentags_project_root  = ['package.json', '.git', '.hg', '.svn']
let g:gutentags_cache_dir = expand('~/.gutentags_cache')
let g:gutentags_exclude_filetypes = ['gitcommit', 'gitconfig', 'gitrebase',
'gitsendemail', 'git']
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', '*.svn', '*.hg',
\  'cache', 'build', 'dist', 'bin', 'node_modules', 'bower_components',
\  '*-lock.json',  '*.lock',
\  '*.min.*',
\  '*.bak',
\  '*.zip',
\  '*.pyc',
\  '*.class',
\  '*.sln',
\  '*.csproj', '*.csproj.user',
\  '*.tmp',
\  '*.cache',
\  '*.vscode',
\  '*.pdb',
\  '*.exe', '*.dll', '*.bin',
\  '*.mp3', '*.ogg', '*.flac',
\  '*.swp', '*.swo',
\  '.DS_Store', '*.plist',
\  '*.bmp', '*.gif', '*.ico', '*.jpg', '*.png', '*.svg',
\  '*.rar', '*.zip', '*.tar', '*.tar.gz', '*.tar.xz', '*.tar.bz2',
\  '*.pdf', '*.doc', '*.docx', '*.ppt', '*.pptx', '*.xls',
\]

https://github.com/ludovicchabant/vim-gutentags/issues/178#issuecomment-575693926

halt on exit · Issue #178 · ludovicchabant/vim-gutentags

If I open a file in the file system and quit quickly, neovim complains following and halt Error detected while processing DirChanged Auto commands for "*": E475: Invalid argument: Channel...

github.com

반응형