nushell / tree-sitter-nu

A tree-sitter grammar for nu-lang, the language of nushell
MIT License
122 stars 27 forks source link

Highlighting breaks on `alias` before `let` #45

Closed stevenxxiu closed 11 months ago

stevenxxiu commented 11 months ago

The following breaks:

alias less = bat
let foo = $'($env.HOME)'

It's fine when alias is removed.

amtoine commented 11 months ago

here's how it looks like nu-bad-highlight

fdncred commented 11 months ago

I'm trying to understand if this is in an editor or on the repl. This is what I get on the repl. image and in vscode image

stevenxxiu commented 11 months ago

I tested it in Neovim. It looks fine for me on the REPL.

fdncred commented 11 months ago

ok, thanks. This is what I get in helix with edbb7ddb42205aa040b7b1255b9cf56e387c433f commit. Highlighting could be better. image

Deleting the first line looks like this. So, it looks like you're correct. image

I don't have tree-sitter-nu installed in neovim.

stevenxxiu commented 11 months ago

I don't have tree-sitter-nu installed in nushell.

Ah nor do I. Thanks, I wasn't aware it could be installed for Nushell.

fdncred commented 11 months ago

oops, I meant neovim. Sorry.