Highlighting Parts of Lua as Bash
xnacly.me
xnacly.me
def doit():
# language=SQL
s = "SELECT * FROM FOO"
run_sql(s)
def run_sql(s: str):
cur = conn.cursor()
cur.execute(s)
Although I am not certain if tree-sitter allows matching on comments, but https://github.com/tree-sitter/tree-sitter/issues/1138 seems to imply that it does