Open a-stewart opened 1 year ago
As far as I can tell, SQL (left side) and SQL inside of C++ (right side) are highlighted the same.
Maybe I'm misunderstanding, or maybe the issue is something with the SQL syntax rather than the C++ syntax?
I'm going to go ahead and close this, but I'll reopen it if you think its still a problem
Sorry, I missed that you had replied.
Syntax highlighting is working fine, what is missing is bracket matching.
I think to get bracket matching to work, you have to specify that sql is an embedded language in package.json
We have some nested syntax highlighting, eg SQL which colours as expected, however, bracket matching does not work, and it just shows the outer brackets of the string.
I think if we specify that SQL is an embedded language in package.json, we should get bracket matching according to https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#embedded-languages. It seems to work as expected in Markdown which does specify that.
https://github.com/microsoft/vscode/blob/main/extensions/markdown-basics/package.json#L38
I had a quick play and tried just setting it up but it didn't work - I think potentially this is due to the fact that in markdown, the scope the embedded language points to is just the embedded SQL, whereas with C++, the scope also includes
R"sql(
and)sql
either side.I didn't get enough time to look into this into much detail though.