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

[Request] Allow highlighting SQL keywords #43

Open
alex-statsig opened this issue Nov 2, 2023 · 0 comments
Open

[Request] Allow highlighting SQL keywords #43

alex-statsig opened this issue Nov 2, 2023 · 0 comments

Comments

@alex-statsig
Copy link

I'm using nunjucks to create templated SQL queries. Historically I've named these files .njk.sql, and just used the SQL syntax highlighting. It's really nice to get the nunjucks highlighting for things inside braces though, so I tried out this extension. This makes the nunjucks much easier to read, but the SQL much harder.

I was wondering if there could be some way to specify the fallback language for things not inside braces. I know that it will be hard/impossible to actually fully parse that, since a nunjucks template may conditionally insert some keywords into it, but at least highlighting keywords / string literals where possible would be great (essentially highlight it as if everything nunjucks-related resolved to an empty block).

Right now I have to choose between these two:

SQL NJK
Screenshot 2023-11-02 at 3 05 07 PM Screenshot 2023-11-02 at 3 04 45 PM
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

1 participant