samuelcolvin / jinjahtml-vscode

Syntax highlighting for jinja(2) html templates in vscode
https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
MIT License
135 stars 53 forks source link

jinja-sql: add support for updated BigQuery syntax comment highlighting #144

Open ivan-toriya opened 1 year ago

ivan-toriya commented 1 year ago

Description: The new syntax for comments in BigQuery allows the use of both # and -- for single-line comments. While the "Better Jinja" extension supports highlighting for the -- comment style, it does not currently highlight the # comment style in .sql files.

Expected Behavior: Both -- and # should trigger comment highlighting when used in .sql files with Jinja context.

Current Behavior: Only -- triggers comment highlighting.

Steps to Reproduce:

  1. Open any .sql file with Jinja context.
  2. Add a comment using the # symbol.
  3. Observe that syntax highlighting is not applied to the # comment.

Potential Impact:

Suggested Solution: Update the syntax highlighting rules to recognize # as a valid starter for a single-line comment in addition to -- when used in Jinja-SQL files.

Additional Context:

Reference to BigQuery’s updated syntax: BigQuery Standard SQL Lexical Structure