nushell / vscode-nushell-lang

A Nushell grammar for Visual Studio Code with IDE support
https://www.nushell.sh/
MIT License
122 stars 27 forks source link

Fix TextMate regex #137

Closed glcraft closed 1 year ago

glcraft commented 1 year ago

From https://github.com/hustcer/nu-grammar/issues/1

Remove non-fixed text width in lookbehind and negative lookahead regex.

Note: about "command" rule regex, i didn't remember why I wrote |(?<=\\)|\\}|\\]|\\$\\w+)\\. in "command" rule. I think it was useful in early stage of making this file. Anyway, I didn't see any case where it is useful now. I tried different files to see if it causes any issue if I remove it, but I didn't see any. So if someone see something wrong in the future, let me now :+1:

fdncred commented 1 year ago

I'm not sure this is working right. Here is variables image

I'm struggling to find something that will test the other changes.

glcraft commented 1 year ago

Argh yeah, that was the issue I was trying to avoid in command... I have to do something so

glcraft commented 1 year ago

okay, i just fix the issue I forgot to transform a "one or more" variable fields repetition to "zero of more" in variables rule.

Tell me if you find something wrong 👍

fdncred commented 1 year ago

I looked it over and tested it out. Nothing else seems to jump out. I did find a new issue though unrelated to this PR. https://github.com/nushell/vscode-nushell-lang/issues/139

fdncred commented 1 year ago

Thanks for all your help!