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

[bug] improper ctags argument ordering #776

Closed
XSven opened this issue Jun 23, 2021 · 0 comments · Fixed by #777
Closed

[bug] improper ctags argument ordering #776

XSven opened this issue Jun 23, 2021 · 0 comments · Fixed by #777
Labels

Comments

@XSven
Copy link

XSven commented Jun 23, 2021

This example tagbar debug output

2021-06-23 07:49:50.071215: ctags_args (is a list): ['--extras=+F', '-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSafet', '--sort=no', '--append=no', '-V', '--options=~/.vim/ctags/perl.ctags', '--language-force=perl', '--perl-kinds=pcMflds']

shows that a g:tagbar_ctags_options setting that leads to --options=~/.vim/ctags/perl.ctags comes before --perl-kinds=pcMflds . With this order it is not possible to turn of kinds like for example p configuring --kinds-perl=-p in the ~/.vim/ctags/perl.ctags file. I would assume that ctags options specified via a g:tagbar_ctags_options should come last and have higher precedence than the ctags options prepared by the tagbar plugin itself.

This is how you can test it. Create a file Foo.pm with the content package Foo;. Then run either

ctags -o - --kinds-perl=-p --perl-kinds=p Foo.pm
Foo     Foo.pm  /^package Foo;$/;"      p

or this

ctags -o - --perl-kinds=p --kinds-perl=-p Foo.pm
# no output
@raven42 raven42 added the bug label Jun 23, 2021
raven42 added a commit to raven42/tagbar that referenced this issue Jun 23, 2021
Closes preservim#776

Change the ordering of the --options field when executing ctags. This
allows overrides of things like the --<lang>-kinds definitions to omit
certain kinds.

Also add check to ensure the typeinfo.deffile exists before attempting
to use it in the ctags arguments.
raven42 added a commit that referenced this issue Jun 24, 2021
Closes #776

Change the ordering of the --options field when executing ctags. This
allows overrides of things like the --<lang>-kinds definitions to omit
certain kinds.

Also add check to ensure the typeinfo.deffile exists before attempting
to use it in the ctags arguments.
dev-hann added a commit to dev-hann/tagbar that referenced this issue Sep 18, 2023
Closes preservim#776

Change the ordering of the --options field when executing ctags. This
allows overrides of things like the --<lang>-kinds definitions to omit
certain kinds.

Also add check to ensure the typeinfo.deffile exists before attempting
to use it in the ctags arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants