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

feat: add support for global parameters #15

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

Conversation

ficcdaf
Copy link

@ficcdaf ficcdaf commented Feb 27, 2025

This PR adds support for global parameters. Closes #14. I added a test case for this as well.

I also made a number of "housekeeping" changes as I implemented this feature.

I bumped the lockfileVersion. This was done automatically by npm when I ran npm install to get LSP support on grammar.js. To that end, I also added the appropriate LSP annotation to grammar.js.

I also upgraded the tree-sitter ABI to version 14. Tree-sitter no longer supports version <= 13. Trying to generate a version 13 parser using tree-sitter version 0.25 results in a crash, so I couldn't avoid doing this while implementing the feature.

Finally, I updated the .gitignore file with a copy of what the latest version of tree-sitter generates when initializing a new repository. Overall, these changes will make life much easier for future contributors.

  • chore: upgrade to ABI 14
  • feat: added support for global parameters
  • chore: updated gitignore
  • chore: bumped lockfileVersion

@ficcdaf
Copy link
Author

ficcdaf commented Feb 27, 2025

The real "juice" of this PR are the changes I made to grammar.js and the addition to the test corpus. The rest of the changes are files generated by tree-sitter. Bumping the package lock version doesn't seem to break anything. Similarly, I couldn't avoid bumping the ABI version because tree-sitter-cli no longer supports generating ABI 13 parsers.

Overall, I hope these changes are OK and shouldn't brack backwards compatibility in Neovim and Helix. But in case they're not, if you only keep the commits that change the grammar and add the test, everything should still work fine.

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.

Support global parameters
1 participant