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

bump up the tree-sitter for nushell #4577

Closed
amtoine opened this issue Nov 3, 2022 · 3 comments · Fixed by #4583
Closed

bump up the tree-sitter for nushell #4577

amtoine opened this issue Nov 3, 2022 · 3 comments · Fixed by #4583
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@amtoine
Copy link
Contributor

amtoine commented Nov 3, 2022

helloe there 👋 😋

this is related to #4162 and LhKipp/tree-sitter-nu#3 👍

the original issue

as stated in the two issues above, i had a highlighting problem in nushell source files, apparently with strings...
according to @LhKipp, this problem has been fixed on LhKipp/tree-sitter-nu/main in 695e3ec7..eb95bdac

my feature request

as can be seen in languages.toml#L1417, helix uses the old db4e990b78824c8abef3618e0f93b7fe1e8f4c0d revision of tree-sitter-nu 😮

i would love to test the new tree-sitter-nu in some nushell source files 🤩

is it as straightforward as opening a PR with the latest revision?
what about the "verified commits"?

cheers 😉

@amtoine amtoine added the C-enhancement Category: Improvements label Nov 3, 2022
@amtoine
Copy link
Contributor Author

amtoine commented Nov 3, 2022

i've tried the fix and it works by applying

diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml
index 94313dc..f4b0775 100644
--- a/.config/helix/languages.toml
+++ b/.config/helix/languages.toml
@@ -7,3 +7,7 @@ roots = []
 comment-token = "(*"
 indent = { tab-width = 4, unit = "  " }
 grammar = "pascal"
+
+[[grammar]]
+name = "nu"
+source = { git = "https://github.com/LhKipp/tree-sitter-nu", rev = "eb95bdac3abd73ef47e53f19c63e74a31405ebd2" }
\ No newline at end of file

and then running

> hx --grammar fetch
Fetching 114 grammars
113 up to date git grammars
1 updated grammars
	nu now on eb95bdac3abd73ef47e53f19c63e74a31405ebd2
> hx --grammar build
Building 114 grammars
113 grammars already built
1 grammars built now
	["nu"]

i'm only concerned with the "verified" commits but, apart from that, would you be open to a PR from me? 😋

@archseer
Copy link
Member

archseer commented Nov 3, 2022

Yes, please open a PR :)

@the-mikedavis the-mikedavis added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors A-language-support Area: Support for programming/text languages labels Nov 3, 2022
@amtoine
Copy link
Contributor Author

amtoine commented Nov 3, 2022

Yes, please open a PR :)

hang on, i'm on it 😏

amtoine added a commit to amtoine/dotfiles that referenced this issue Nov 4, 2022
This reverts commit 02ec252.
The new `nu` revision of tree-sitter is in the source languages.toml
config file for language server.

Related to LhKipp/tree-sitter-nu#3,
helix-editor/helix#4577 and
helix-editor/helix#4583.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants