-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Confusing error message when or
parenthesis is missing
#7405
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/what-would-you-like-to-see-improved-in-nix-cli-experience/24012/6 |
Oh wow. How is |
and... I DID IT AGAIN. Should have been me opening this issue because I keep repeating this mistake.
Fwiw, there's no That's not a good excuse though; I agree. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-interpreter-and-nix-language-quirks/25117/2 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-interpreter-and-nix-language-quirks/25117/3 |
It'd be really nice if the After seeing the "or" operator last year I spent quite a while trying to figure out what it was and how it worked and found absolutely nothing. Happened to come across this thread while searching something else. |
or
parenthesis is missing
Mentioning |
Feel free to split that row into two rows on the wiki. I'm sure that will be clearer.
If it's feasible to express this in the grammar-like construct you're probably using, you could perhaps highlight it in red or yellow when any occurrence of |
Alright, I did my best to clear it up on the Wiki. In this base version of syntax highligher, I prefer not to impose any style preferences when the code is executable. I'll just make sure that "or" is not highlighted when its not a part of the ternary operation. Maybe I can make an opinionated version that highlights |
Yeah, it's just an idea. Where will your highlighter be used? |
It's a textmate highlighter so it can be adapted to a lot of editors/runtimes, but it'll be packaged up in a VS Code/VS Codium extension. I'm the maintainer for the C++ and Shell syntax of VS Code, so if I can make a good one for nix I was going to reach out to some of my Microsoft contacts and see if it could become part of the built-in language support. There's a few things I wanted to do different than the exisitng syntax. |
I lost about an hour trying to understand what's going on and that it needs parenthesis like
(throw "what")
See #629
cc @bburdette
The text was updated successfully, but these errors were encountered: