Tagbar fails due to `gotag --version` invocation
therealplato opened this issue · 2 comments
therealplato commented
Tagbar+gotags used to work fine for me; not sure what I changed, but now when I hit my :TagbarToggle
bind, I get this error:
Tagbar: Ctags doesn't seem to be Exuberant Ctags!
BSD ctags will NOT WORK. Please download Exuberant Ctags from ctags.sourceforge.net and install it in a directory in your $PATH or set g:tagbar_ctags_bin.
Executed command: "'gotags' --version"
Command output:
flag provided but not defined: -version
gotags version 1.4.1
Usage: gotags [options] file(s)
-L string
...
My vim config includes:
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
let g:tagbar_autoclose = 1
let g:tagbar_ctags_bin = 'gotags'
jstemmer commented
I think this is caused by the last line in your config, you shouldn't need that as ctagsbin
is already configured a few lines above it.
Can you remove the line that says let g:tagbar_ctags_bin = 'gotags'
and try again?
therealplato commented
That worked, awesome! thanks @jstemmer