tree-sitter-nu
tree-sitter-nu copied to clipboard
A tree-sitter grammar for nu-lang, the language of nushell
Treesitter highlighting fails when else flag is missing a closure ``else $statement``. **Look at the let keywords below.** Example without closure:  Example with closure:  Tested in neovim.
Just as the title says, having `^'bin' command` in the nu file doesn't get parsed. 
Do you have any plans for syntax highlighting in this repo? It appears common that treesitter repos (I sampled cpp, js and python) do have `highlights.scm` files. My general experience...
Using this page https://meimporta.eu/tree-sitter/json2ebnf.html we can get a navigable railroad diagram for tree-sitter grammars like this project. See also https://github.com/tree-sitter/tree-sitter/issues/2268 . Cheers !
i think queries should be written for tree-sitter-based editors to enable syntax highlighting resources: - [official tree-sitter query docs](https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries) - neovim - [nvim-treesitter docs](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md) - helix - [helix query docs](https://docs.helix-editor.com/guides/textobject.html)...
Hey :wave: [rocks.nvim supports using tree-sitter parsers that have been published to luarocks.org as plugin dependencies](https://github.com/nvim-neorocks/rocks.nvim?tab=readme-ov-file#deciduous_tree-enhanced-tree-sitter-support). This means that rocks.nvim users can just `:Rocks install my-nushell-plugin.nvim`, and the tree-sitter parser...
Original comments - https://github.com/nushell/tree-sitter-nu/pull/99#issuecomment-2165419934 Notice how the `--` are different colors. Copied from #99 It looks like the highlighting is a bit off now. This is from the toolkit.nu file...
Currently, the `...` is parsed as a string, whereas it's a special operator that should be assigned something special, and then highlighted as an operator. If it's parsed as a...
https://www.nushell.sh/blog/2024-05-28-nushell_0_94_0.html#new-language-feature-raw-strings-toc
### Related Problem Because tree-sitter-nu is still WIP there are various errors still in it. The code could still be highlighted even when errors occur (except for the snippest of...