Skip to content

Commit

Permalink
Merge pull request #232 from microsoft/injectPGGrammar
Browse files Browse the repository at this point in the history
Inject pg specific grammar to support syntax highlighting
  • Loading branch information
swjain23 authored Jul 29, 2020
2 parents bd4e44f + 057c86a commit 848cab3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 779 deletions.
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
"postinstall": "node ./node_modules/vscode/bin/install && node ./node_modules/azdata/bin/install"
},
"contributes": {
"languages": [
"grammars": [
{
"id": "sql",
"extensions": [
".sql"
],
"aliases": [
"SQL"
]
"injectTo": [ "source.sql" ],
"scopeName": "source.pgsql-injection.sql",
"path": "./syntaxes/pgsql-injection.json"
}
],
"outputChannels": [
Expand Down
18 changes: 18 additions & 0 deletions syntaxes/pgsql-injection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"patterns": [
{
"include": "#pgsql-keywords"
}
],
"repository": {
"pgsql-keywords": {
"patterns": [{
"name": "keyword.pgsql.sql",
"match": "\\b(?i)(conflict|do|exception)\\b"
}]
}
},
"scopeName": "source.pgsql-injection.sql",
"injectionSelector": "L:source.sql"
}
Loading

0 comments on commit 848cab3

Please sign in to comment.