barklan / inline_sql_syntax

Highlight and lint inline SQL strings.
https://marketplace.visualstudio.com/items?itemName=qufiwefefwoyn.inline-sql-syntax
MIT License
58 stars 25 forks source link

Syntax highliting for individual queries in multiline strings (abstracted from language-specific strings) #78

Open barklan opened 2 years ago

barklan commented 2 years ago

Example:

query = """
    SELECT * FROM book;
    SELECT id FROM user;
"""

Two queries should be highlighted separately (starting token is SELECT, ending is semicolon (;).

The thing I'm worried about here is false positives like this one:

query = """
    THIS IS SOME CAPS TEXT. WHO KNOWS WHY IT'S CAPS, but the next line is highlighted as SQL.
    SELECT COMMITTEE .. SOME GIBBERISH FROM SOMETHING. 
"""