-
Notifications
You must be signed in to change notification settings - Fork 1.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
MongoDB syntax #2518
MongoDB syntax #2518
Conversation
Another way - I could name that token not "builtin", but something that has different color, but then meaning will be lost, which is bad too |
You could use an alias. If you define |
@RunDevelopment Didn't use "function" as generic JS function and mongodb function should be highlighted different. |
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.
Looks good @airs0urce!
A few minor nits and then we can merge this.
@RunDevelopment yes, agree about everything, will make the changes. If we highlight only full string containing URL or IP it will break the original idea of adding highlight because it's easy to catch URL or IP if it's fully inside string. So, if you think that false positives possible then I can just remove url and ip from the definition. Or I can change as you suggested, but right now not sure if it will be useful if it's done this way. |
If that was the explicit intention, then it's ok to keep it as is. |
@RunDevelopment Yes, it was explicit. many developers use MongoDB for logging purpose, so it should help to parse strings by eyes. |
Thank you for contributing @airs0urce! |
I applied changes as we discussed here: #2502
And also I have one question. I see with default theme tokens "builtin" and "string" have same color which visually looks like parsing has been broken:
In some themes "builtin" token has different color, not like "string" token, which looks good:
Question is - is there any recommendations by making "builtin" looks different from string with default theme?
Sure, I could create another theme and use it, but if the pull request will be approved, for people who decides to use this syntax it will be working bad by default like in the first screenshot.