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

Commit f022958

Browse files
tobiasdiezacao
authored andcommitted
Enable in vue files
1 parent 9868260 commit f022958

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Lots of new improvements happening! We now have a [`CHANGELOG.md`](https://githu
3131
- go to definition support (input, enum, type)
3232
- outline support
3333

34-
### `gql`/`graphql` tagged template literal support for tsx, jsx, ts, js
34+
### `gql`/`graphql` tagged template literal support for tsx, jsx, ts, js, vue
3535

3636
- syntax highlighting (type, query, mutation, interface, union, enum, scalar, fragments, directives)
3737
- autocomplete suggestions

src/extension.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ export function activate(context: ExtensionContext) {
7070
{ scheme: "file", language: "javascriptreact" },
7171
{ scheme: "file", language: "typescript" },
7272
{ scheme: "file", language: "typescriptreact" },
73+
// this applies grammar and thus highlighting i think?
74+
{ scheme: "file", language: "vue" },
7375
],
7476
synchronize: {
7577
// TODO: should this focus on `graphql-config` documents, schema and/or includes?
@@ -81,8 +83,10 @@ export function activate(context: ExtensionContext) {
8183
true,
8284
),
8385
// these ignore node_modules and .git by default
86+
// this is more important for language features.
87+
// we don't have language features for .vue yet but we can still try to load the files
8488
workspace.createFileSystemWatcher(
85-
"**/{*.graphql,*.graphqls,*.gql,*.js,*.mjs,*.cjs,*.esm,*.es,*.es6,*.jsx,*.ts,*.tsx}",
89+
"**/{*.graphql,*.graphqls,*.gql,*.js,*.mjs,*.cjs,*.esm,*.es,*.es6,*.jsx,*.ts,*.tsx,*.vue}",
8690
),
8791
],
8892
},
@@ -128,6 +132,7 @@ export function activate(context: ExtensionContext) {
128132
"typescript",
129133
"javascriptreact",
130134
"typescriptreact",
135+
"vue",
131136
"graphql",
132137
],
133138
new GraphQLCodeLensProvider(outputChannel),

src/status/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const statusBarActivationLanguageIds = [
3333
"javascript",
3434
"javascriptreact",
3535
"typescript",
36-
"typescriptreact"
36+
"typescriptreact",
37+
"vue"
3738
];
3839

3940
function initStatusBar(

0 commit comments

Comments
 (0)