Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling for typeinfo.deffile #777

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions autoload/tagbar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1390,11 +1390,6 @@ function! s:ExecuteCtagsOnFile(fname, realfname, typeinfo) abort
let ctags_args += [ '-V' ]
endif

" Include extra type definitions
if has_key(a:typeinfo, 'deffile')
let ctags_args += ['--options=' . expand(a:typeinfo.deffile)]
endif

" Third-party programs may not necessarily make use of this
if has_key(a:typeinfo, 'ctagstype')
let ctags_type = a:typeinfo.ctagstype
Expand All @@ -1409,6 +1404,12 @@ function! s:ExecuteCtagsOnFile(fname, realfname, typeinfo) abort
let ctags_args += ['--language-force=' . ctags_type]
let ctags_args += ['--' . ctags_type . '-kinds=' . ctags_kinds]
endif

" Include extra type definitions - include last to allow for any
" overrides
if has_key(a:typeinfo, 'deffile') && filereadable(expand(a:typeinfo.deffile))
let ctags_args += ['--options=' . expand(a:typeinfo.deffile)]
endif
endif

if has_key(a:typeinfo, 'ctagsbin')
Expand Down