-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add Nushell #6403
Add Nushell #6403
Conversation
How is Nushell different from Nu which Linguist already supports and has done so for many many years? From a cursory naïve look, it appears to be the same thing with Nushell often being referred to as Nu, even in the Nushell book. |
They are totally two different languages with the same name, and they are created by two different teams. That's why I updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification that this is a completely different language.
We need a few changes though:
- Please update the template in the OP to state the licenses of the two samples and add a reason for why you have chosen the colour you have.
- You need to add the cached license file for the grammar. This should have been created when you run
script/add-grammar
(you can manually run the command here if you can't find the file). - See inline comments.
I don't know what's OP. I have just updated the description of license for the two samples. And updated the color to
Added
I have removed |
I'm showing my age: OP == original post 😁
No. We need to ensure that your heuristics do not incorrectly identify Nu files as Nushell. The heurstics are read top-down. Which means we'll try the Nushell heuristic first and if it doesn't match, we move onto the next regex for that extension. If there isn't one, or there isn't a match, we move onto the classifier. The classifier should be considered the last resort as it's trained on the samples and as such may not be accurate. By adding The |
@lildude Thanks for the detailed explanation, I have just updated the PR, Please check it again |
Should fix #6214 |
@lildude Can this PR be Approved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Note: this PR will not be merged until close to when the next release is made. See here for more details.
Description
Checklist:
The extension of the new language is used in hundreds of repositories on github.com.
I have included a real-world usage sample for all extensions added in this PR:
I have included a syntax highlighting grammar: Nushell Grammar
I have added a color
#4E9906
I have updated the heuristics to distinguish my language from others using the same extension.