Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 006d7ec

Browse files
author
Divyendu Singh
authored
Merge pull request #36 from prismagraphql/fix_syntax_highlighting
Fix syntax highlighting
2 parents 81ec81e + 8503416 commit 006d7ec

File tree

3 files changed

+26
-37
lines changed

3 files changed

+26
-37
lines changed

grammars/graphql.json

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -195,38 +195,16 @@
195195
"comment":
196196
"need to prefix comment space with a scope else Atom's reflow cmd doesn't work",
197197
"name": "comment.line.graphql",
198-
"match": "\\s*#.*"
198+
"match": "#(?=([^\"]*\"[^\"]*\")*[^\"]*$).*$"
199199
},
200200
"graphql-description-singleline": {
201-
"comment":
202-
"In new graphql spec 0.12.0, the description have to be specified as doc-strings or single-line text in double quotes",
203-
"name": "graphql.description",
204-
"match": "^\\s*(\"(?:\"\")?)([^\"].*)(\"(?:\"\")?)$",
205-
"captures": {
206-
"1": { "name": "comment.quoted.double.graphql.begin" },
207-
"2": { "name": "comment.description.graphql" },
208-
"3": { "name": "comment.quoted.double.graphql.end" }
209-
}
201+
"name": "comment.line.number-sign.graphql",
202+
"match": "#(?=([^\"]*\"[^\"]*\")*[^\"]*$).*$"
210203
},
211204
"graphql-description-docstring": {
212-
"comment":
213-
"In new graphql spec 0.12.0, the description have to be specified as doc-strings or single-line text in double quotes",
214-
"name": "graphql.description",
215-
"begin": "(\"\"\")(?:$|(.*))",
216-
"beginCaptures": {
217-
"1": { "name": "comment.quoted.double.graphql.begin" },
218-
"2": { "name": "comment.block.description.graphql" }
219-
},
220-
"end": "^\\s*(\"\"\")$",
221-
"endCaptures": {
222-
"1": { "name": "comment.quoted.double.graphql.end" }
223-
},
224-
"patterns": [
225-
{
226-
"name": "comment.block.description.graphql",
227-
"match": "^\\s*.*$"
228-
}
229-
]
205+
"name": "comment.block.graphql",
206+
"begin": "\"\"\"",
207+
"end": "\"\"\""
230208
},
231209
"graphql-variable-definitions": {
232210
"begin": "\\s*(\\()",

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"private": false,
44
"license": "MIT",
55
"displayName": "GraphQL",
6-
"description":
7-
"GraphQL extension for VSCode adds syntax highlighting, validation, and language features like go to definition, hover information and autocompletion for graphql projects. This extension also works with queries annotated with gql tag.",
6+
"description": "GraphQL extension for VSCode adds syntax highlighting, validation, and language features like go to definition, hover information and autocompletion for graphql projects. This extension also works with queries annotated with gql tag.",
87
"icon": "assets/images/logo.png",
98
"repository": {
109
"type": "git",
@@ -15,7 +14,7 @@
1514
"color": "#032539",
1615
"theme": "dark"
1716
},
18-
"version": "0.0.8",
17+
"version": "0.0.9",
1918
"publisher": "Prisma",
2019
"engines": {
2120
"vscode": "^1.23.0"
@@ -40,8 +39,14 @@
4039
"languages": [
4140
{
4241
"id": "graphql",
43-
"extensions": [".gql", ".graphql"],
44-
"aliases": ["GraphQL", "graphql"],
42+
"extensions": [
43+
".gql",
44+
".graphql"
45+
],
46+
"aliases": [
47+
"GraphQL",
48+
"graphql"
49+
],
4550
"configuration": "./language/language-configuration.json"
4651
}
4752
],
@@ -74,13 +79,18 @@
7479
],
7580
"configuration": {
7681
"vscode-graphql.debug": {
77-
"type": ["boolean", "null"],
82+
"type": [
83+
"boolean",
84+
"null"
85+
],
7886
"title": "VSCode GraphQL - Debug Mode",
7987
"default": false,
8088
"description": "Enable debug logs"
8189
},
8290
"vscode-graphql.trace.server": {
83-
"type": ["string"],
91+
"type": [
92+
"string"
93+
],
8494
"title": "VSCode GraphQL - Trace Language Server",
8595
"default": "off",
8696
"description": "Enable tracing for language server"
@@ -103,7 +113,8 @@
103113
"compile": "rimraf out && tsc -p ./",
104114
"watch": "tsc -watch -p ./",
105115
"postinstall": "node ./node_modules/vscode/bin/install",
106-
"test": "npm run compile && node ./node_modules/vscode/bin/test"
116+
"test": "npm run compile && node ./node_modules/vscode/bin/test",
117+
"package": "vsce package"
107118
},
108119
"devDependencies": {
109120
"@types/graphql": "0.12.3",

0 commit comments

Comments
 (0)