Skip to content

Conversation

@ficd0
Copy link
Contributor

@ficd0 ficd0 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

@ficd0
Copy link
Contributor Author

ficd0 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.

@Axlefublr
Copy link

omg hell yeah! would love to get this merged

@justinmk
Copy link
Owner

This is appreciated, and thanks for the clarity. Sorry for the delay, looking at this now.

@justinmk justinmk merged commit 32b3186 into justinmk:master Mar 11, 2025
@ficd0
Copy link
Contributor Author

ficd0 commented Mar 11, 2025

No worries, thanks for merging!

mojadem pushed a commit to mojadem/kak-tree-sitter that referenced this pull request Sep 11, 2025
The new ref contains global parameters support implemented in justinmk/tree-sitter-ini#15, which greatly improves the experience of using this grammar to edit config files.
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

3 participants