Closed ossie-git closed 2 years ago
The support in tagbar is for asciidoc
, and your UCtags is reporting support for Asciidoc
. Also the standard VIM filetype definition is asciidoc
. Yet if you look at your log, the filetype it is looking for support for is asciidoctor
(with the extra "tor" on the end). Where is your filetype being set to asciidoctor
and why?
@alerque Nice catch. I'm using the vim-asciidoctor plugin which sets the filetype to asciidoctor. Is there a way to alias it or would I have to update uctags.vim?
You should be able to add support via your vim RC file as if you were adding a new filetype (see examples in the wiki) and then just set the value to the existing uctags config for asciidoc
. That should effectively alias them.
We could also add this alias out of the box, but I'm a little hesitant to do that without understanding why that plugin is using a non standard filetype. That just smells wrong to me.
Got it working. Here's the section you add to your Vim RC in case anyone runs into this in the future:
let g:tagbar_type_asciidoctor = {
\ 'ctagstype' : 'asciidoc',
\ 'kinds' : [
\ 'c:chapter:0:1',
\ 's:section:0:1',
\ 'S:subsection:0:1',
\ 't:subsubsection:0:1',
\ 'T:paragraph:0:1',
\ 'u:subparagraph:0:1',
\ 'a:anchor:0:0',
\ ],
\ 'sro' : '""',
\ 'kind2scope' : {
\ 'c' : 'chapter',
\ 's' : 'section',
\ 'S' : 'subsection',
\ 't' : 'subsubsection',
\ 'T' : 'l4subsection',
\ 'u' : 'l5subsection',
\ },
\ 'scope2kind' : {
\ 'chapter' : 'c',
\ 'section' : 's',
\ 'subsection' : 'S',
\ 'subsubsection' : 't',
\ 'l4subsection' : 'T',
\ 'l5subsection' : 'u',
\ },
\ 'sort' : 0,
\ }
Thank you for your help @alerque
Hi,
I'm currently running the latest version of:
on Mac OS X with Vim 8.2
I've configured it to use Universal ctags by pointing it to the binary:
but whenever I run it on an Asciidoc document, Tagbar just shows nothing. I've verified that
uctags
successfully generates a localtags
file when invoked from the CLI (I know Tagbar doesn't use this but I used it to verify that uctags works) and it is on the list of supported languages:When I ran Tagbar in debugging mode, it finds uctags but then says that asciidoctor is an unsupported filetype, even though I verified that it is defined in uctags.vim:
Even on a simple file such as this it shows nothing:
Any ideas? I've already looked at similar related issues but none of them solved my issue. Thanks.