Open sepsol opened 2 years ago
It would be even nicer if we could set our own regexp/startswith config. For instance, the keyword "WITH" should trigger highlighting too.
TextMate does not support multiple line matches, so this could be a significant change, but desirable as I start queries with `\n
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 https://github.com/barklan/inline_sql_syntax/issues/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.
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.