chdsbd / vscode-python-inline-sql-syntax

Add SQL syntax highlighting for Python strings.
MIT License
1 stars 0 forks source link

Support f-strings #1

Open chdsbd opened 8 months ago

chdsbd commented 8 months ago

We should update the syntax to support f-strings.

https://github.com/chdsbd/vscode-python-inline-sql-syntax/blob/f81ce39ed12ff70f9170c101cb03143155eb4204/syntaxes/highlight-sql.json

jxu commented 8 months ago

this is what vs code reports as scope https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars

textmate scopes 
string.quoted.multi.python
string.interpolated.python
punctuation.definition.string.begin.python
meta.fstring.python
meta.function-call.arguments.python
meta.function-call.python
meta.member.access.python
source.python
jxu commented 8 months ago

Incidentally, I am only using f-strings because I could not find how to do prepared statements in DuckDB https://github.com/duckdb/duckdb/discussions/11262