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

Allow custom language definitions #876

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AndyMcAliley
Copy link

@AndyMcAliley AndyMcAliley commented Mar 8, 2024

Fixes #789

This PR adds a second duplicate --option directive to the ctags command, using deffile twice. The first --option comes prior to --language-force and lets ctags know the custom language. The second --option comes last to override the default --kinds-<lang> definition.

This PR addresses the same problem that #792 addresses, but in a different way that doesn't require additional user options.

This fix needs testing, especially on the use case described in #776.

@AndyMcAliley
Copy link
Author

AndyMcAliley commented Mar 8, 2024

Actually, maybe it would be even better to check if the language is recognized by ctags, and only include the first --option directive for custom languages. I added a commit to do that. I added another commit to only call ctags --list-languages once.

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

Successfully merging this pull request may close these issues.

#777 breaks the ability to add a definition for a new language or file type
1 participant