Skip to content
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

Enhanced auto-syntax highlighting #42

Open
sepsol opened this issue Apr 20, 2022 · 3 comments
Open

Enhanced auto-syntax highlighting #42

sepsol opened this issue Apr 20, 2022 · 3 comments

Comments

@sepsol
Copy link

sepsol commented Apr 20, 2022

Currently, the extension automatically detects strings starting with certain words as sql syntax but this wouldn't work if the string first starts with tabs, spaces, and line breaks and then has those words. It'd be great if it could skip whitespace characters and check the first valid word for syntax highlighting.

@ShimShamSam
Copy link

It would be even nicer if we could set our own regexp/startswith config. For instance, the keyword "WITH" should trigger highlighting too.

@RLaursen
Copy link

RLaursen commented Jun 14, 2022

TextMate does not support multiple line matches, so this could be a significant change, but desirable as I start queries with `\n

@macnewbold
Copy link

I ran into the issue with WITH today as well, and would love it if that were on the list of SQL-start keywords. This also matches up nicely with the recently-submitted issue #109, regarding whitespace at the beginning of the string before a magic keyword. We regularly put a large inline query at the start of the next line, so having whitespace be ignored (and recognizing WITH) would save us a whole lot of --sql sprinkled everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants