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

Add case-insensitive keyword support, and add better golang multiline support #87

Closed jwhitaker-swiftnav closed 2 years ago

jwhitaker-swiftnav commented 2 years ago

Two things in here (i can split them if you like) 1) normal multi-language keyword detections are now case-insensitive. 2) Golang injection reworked with a strategy I've used for Python in the past: detect sql keywords inside a string context instead of detecting stringstart+sqlkeyword in source context. This allows matching of constructs like

sql := `
select from hihi
`

screenshot from your multiline.go example with my changes:

image

barklan commented 2 years ago

Thank you, for golang especially!