From 7d9ce3589a9d94e005f83cfaef53e89e93067878 Mon Sep 17 00:00:00 2001 From: Jaromir Hradilek Date: Sat, 2 Oct 2021 23:26:46 +0200 Subject: [PATCH] Allow addition of new language types (#789) --- autoload/tagbar.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 9748f04d..1caae994 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -1397,6 +1397,12 @@ function! s:ExecuteCtagsOnFile(fname, realfname, typeinfo) abort let ctags_args += [ '-V' ] endif + " Define a new language before adding --language-force to the list of + " arguments + if has_key(a:typeinfo, 'deflang') + let ctags_args += ['--langdef=' . expand(a:typeinfo.deflang)] + endif + " Third-party programs may not necessarily make use of this if has_key(a:typeinfo, 'ctagstype') let ctags_type = a:typeinfo.ctagstype