tree-sitter-nu icon indicating copy to clipboard operation
tree-sitter-nu copied to clipboard

A tree-sitter grammar for nu-lang, the language of nushell

Results 30 tree-sitter-nu issues
Sort by recently updated
recently updated
newest added

Treesitter highlighting fails when else flag is missing a closure ``else $statement``. **Look at the let keywords below.** Example without closure: ![image](https://github.com/nushell/tree-sitter-nu/assets/1347244/781ea53a-ce2b-4d7d-9eef-ab139c21176b) Example with closure: ![image](https://github.com/nushell/tree-sitter-nu/assets/1347244/3fb35c87-550e-483a-9e37-79065ea72496) Tested in neovim.

Just as the title says, having `^'bin' command` in the nu file doesn't get parsed. ![image](https://github.com/nushell/tree-sitter-nu/assets/25223592/c903c73f-9f13-437a-a60d-9c29616ea780)

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