-
Notifications
You must be signed in to change notification settings - Fork 4
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
Customize the highlight syntax manually #4
Comments
Hi @bscan, There is a manual way to disable it:
Also, I have an idea to modify the rule JSON config by a TS/JS script, but I am not sure if it can work. Please excuse me for the slow development, because my current work has less relation with SQL or other embedded languages. |
The SQL uppercase rule is triggered by any match, even if the keyword is in the middle of another word. Additionally, the text must include a (Example using PowerShell, where I encountered the issue, but it should affect any language) While the SQL keyword matching is useful for inline text it is more likely to cause problems than solve them as implemented. At the very least, the SQL keyword rule regex should match if the keyword is preceded by a word boundary metacharacter - this would fix issues where the keyword appears at the end of another word in a non-SQL statement. However, this is only an edge case. For best experience, the SQL keyword rule should be removed completely. SQL syntax highlighting can still be achieved using multiline text with |
In my view, adding a |
In case there is a misunderstanding - adding a |
I understand. I was just explaining why I added the SQL keyword rule. Due to the limitations mentioned in #6, this is the best compromise I can offer. Different people have their own requirements, so I recommend editing the syntaxes to solve your problem. |
Hi, this extension is great for VSCode, thanks! For SQL, is it possible to add a setting to disable the highlighting on UPPERCASE statements? I often read existing code with embedded SQL that does not have semicolon endings. For these cases, the highlighting will be incorrect for the rest of the code. Python example below.
The text was updated successfully, but these errors were encountered: