0

我已经安装了vim-go和所有需要的二进制文件,添加了tagbar插件https://github.com/majutsushi/tagbargotagsctags二进制文件存在于 5 月 $PATH 中。

问题是某些函数/变量将我重定向到绝对错误的行(对于多个标签栏的函数也是如此),其中一些可以正常工作。我什至无法在当前项目中打开main()函数。而且我没有看到这些函数/对象之间的标签栏/代码的差异。

这也被添加到.vimrc

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'
\ }

请帮助使标签栏正常工作,我错过了什么?

4

0 回答 0