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

Architectural issues regarding subparsers in ctags. #540

Open
EvanCarroll opened this issue May 23, 2019 · 1 comment
Open

Architectural issues regarding subparsers in ctags. #540

EvanCarroll opened this issue May 23, 2019 · 1 comment

Comments

@EvanCarroll
Copy link

EvanCarroll commented May 23, 2019

Tagbar does not currently support ctag subparsers (as implemented here universal-ctags/ctags#2070) That is it determines the filetype and spawns off to ctags by forcing --language-force= and hard coding the kinds with --$lang-kinds=kinds. You can see this here

What needs to happen is,

  • These two lines above need to be purged in tagbar.vim
  • We need let ctags figure out the language
  • We need to let ctags provide us all the kinds available, because we can't enumerate types that may or may not be present in subparsers in a configuration for the parent parser.
  • We need to remove the ctagstype and kind properties from all languages in uctags.vim
  • Instead of placing the names of kinds to resolve the single letter to the display name we should use --output-format=xref which provides the resolutions for us. This means if a subparser is invoked we can use the output to decide the display name, rather than having to code that in our own configuration file.
  • We need to delete the hard-coded clearing of --extra because that stops subparsers https://github.com/majutsushi/tagbar/blob/387bbadda98e1376ff3871aa461b1f0abd4ece70/autoload/tagbar.vim#L1094

If you want me to do the work for uctags, I'm happy to help out.

@EvanCarroll EvanCarroll changed the title Architectural Issues. Architectural issues regarding subparsers in ctags. May 23, 2019
@EvanCarroll
Copy link
Author

One of things we may want to do is simply only support universal ctags. If that's the case we can really sanitize this implementation easily. I'd even rather us self-package ctags in a ./.vim/tagbar/bin rather than fall back to etags. If that's ok, I can whip up a patch reduce the code as described above, and support subparsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants