Open sdankel opened 6 months ago
Hi @sdankel! Can I help?
@yehia67 Please do! The package is published at https://www.npmjs.com/package/tree-sitter-sway.
On it 🏃 My solution:
init.vim
file.nvim-treesitter
to the init.vim
file
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Wdyt @sdankel ?
We want to make sway a supported language in nvim-treesitter
. See https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
Yeah, You successfully supported it here tree-sitter-sway.
So I need to find a way to install tree-sitter-sway syntax on the syntax/sway.vim
instead of this highlighting syntax block, yes? (Just to confirm if I understood the requirements 🙏)
The flow for the user would be that they simply install nvim-treesitter, and then run :TSInstall sway
to install the sway syntax. They would no longer need to copy a syntax/sway.vim
from this repo.
To do this, we'll need to submit a PR to that repo to add the tree-sitter-sway parser. Here are example PRs: https://github.com/nvim-treesitter/nvim-treesitter/pulls?q=is%3Apr+add+label%3A%22new+language%22
Ah, that makes perfect sense. Sorry for the confusion. I've created a draft pull request (PR) on my forked repository, which you can find here. Please let me know if there's anything else you need me to add; I would be happy to do so.
Additionally, I've designated you as the maintainer of the language in this section of the README. If you would prefer that I tag someone else or mention myself instead, please let me know.
The PR looks good to me, and thanks for adding me as the maintainer. Once it's merged and we can verify it, the next steps will be removing the syntaxes file from this repo and updating the README. Thank you for contributing!
Thank you for your support 🙏
I created the PR👇
https://github.com/nvim-treesitter/nvim-treesitter/pull/6251
Hi @sdankel, The parser compiler for the queries is giving some "Invalid capture" errors, I fixed some of the errors with his commit I am not 100% sure about my fixes tbh as I just copied from other projects, May you please point me to any resource for fixing the parser issue and I can work on it
The maintainer of transmitter told me how to fix the queries, By using syntaxes of the Contribue.md I will check and keep you updated
We should deprecate the syntax highlighting file in this repo and instead add sway to nvim-treesitter. That way we only need to keep the tree-sitter-sway grammar updated.