preservim / tagbar

Vim plugin that displays tags in a window, ordered by scope
https://preservim.github.io/tagbar
Other
6.09k stars 484 forks source link

Pandoc markdown not detected #835

Closed daveriedstra closed 1 year ago

daveriedstra commented 1 year ago

It seems like tagbar's markdown support only works for syntax=markdown and not syntax=pandoc (which is set for markdown files by the vim-pandoc plugin)

raven42 commented 1 year ago

This can likely be addressed with the following:

diff --git a/autoload/tagbar/types/uctags.vim b/autoload/tagbar/types/uctags.vim
index a6656cd..7b40096 100644
--- a/autoload/tagbar/types/uctags.vim
+++ b/autoload/tagbar/types/uctags.vim
@@ -713,6 +713,7 @@ function! tagbar#types#uctags#init(supported_types) abort
     let type_markdown.sro = '""'
     let type_markdown.sort = 0
     let types.markdown = type_markdown
+    let types.pandoc = type_markdown
     " Matlab {{{1
     let type_matlab = tagbar#prototypes#typeinfo#new()
     let type_matlab.ctagstype = 'matlab'
raven42 commented 1 year ago

If you can help validate this, then we can look at getting this merged in.

daveriedstra commented 1 year ago

Like a charm, thank you!