astro-vscode 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -12
- package/package.json +86 -26
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,12 +22,14 @@ var __toModule = (module2) => {
|
|
|
22
22
|
};
|
|
23
23
|
__markAsModule(exports);
|
|
24
24
|
__export(exports, {
|
|
25
|
-
activate: () => activate
|
|
25
|
+
activate: () => activate,
|
|
26
|
+
deactivate: () => deactivate
|
|
26
27
|
});
|
|
27
28
|
var import_vscode = __toModule(require("vscode"));
|
|
28
29
|
var import_node = __toModule(require("vscode-languageclient/node"));
|
|
29
30
|
var import_autoClose = __toModule(require("./html/autoClose.js"));
|
|
30
31
|
const TagCloseRequest = new import_node.RequestType("html/tag");
|
|
32
|
+
let client;
|
|
31
33
|
async function activate(context) {
|
|
32
34
|
const serverModule = require.resolve("@astrojs/language-server/bin/nodeServer.js");
|
|
33
35
|
const port = 6040;
|
|
@@ -43,23 +45,15 @@ async function activate(context) {
|
|
|
43
45
|
const clientOptions = {
|
|
44
46
|
documentSelector: [{scheme: "file", language: "astro"}],
|
|
45
47
|
synchronize: {
|
|
46
|
-
configurationSection: ["astro", "javascript", "typescript", "prettier", "emmet"],
|
|
47
48
|
fileEvents: import_vscode.workspace.createFileSystemWatcher("{**/*.js,**/*.ts}", false, false, false)
|
|
48
49
|
},
|
|
49
50
|
initializationOptions: {
|
|
50
|
-
configuration: {
|
|
51
|
-
astro: import_vscode.workspace.getConfiguration("astro"),
|
|
52
|
-
prettier: import_vscode.workspace.getConfiguration("prettier"),
|
|
53
|
-
emmet: import_vscode.workspace.getConfiguration("emmet"),
|
|
54
|
-
typescript: import_vscode.workspace.getConfiguration("typescript"),
|
|
55
|
-
javascript: import_vscode.workspace.getConfiguration("javascript")
|
|
56
|
-
},
|
|
57
51
|
environment: "node",
|
|
58
52
|
dontFilterIncompleteCompletions: true,
|
|
59
53
|
isTrusted: import_vscode.workspace.isTrusted
|
|
60
54
|
}
|
|
61
55
|
};
|
|
62
|
-
|
|
56
|
+
client = createLanguageServer(serverOptions, clientOptions);
|
|
63
57
|
context.subscriptions.push(client.start());
|
|
64
58
|
client.onReady().then(() => {
|
|
65
59
|
const tagRequestor = (document, position) => {
|
|
@@ -117,11 +111,18 @@ async function activate(context) {
|
|
|
117
111
|
getLanguageServer: getLSClient
|
|
118
112
|
};
|
|
119
113
|
}
|
|
114
|
+
function deactivate() {
|
|
115
|
+
if (!client) {
|
|
116
|
+
return void 0;
|
|
117
|
+
}
|
|
118
|
+
return client.stop();
|
|
119
|
+
}
|
|
120
120
|
function createLanguageServer(serverOptions, clientOptions) {
|
|
121
121
|
return new import_node.LanguageClient("astro", "Astro", serverOptions, clientOptions);
|
|
122
122
|
}
|
|
123
123
|
// Annotate the CommonJS export names for ESM import in node:
|
|
124
124
|
0 && (module.exports = {
|
|
125
|
-
activate
|
|
125
|
+
activate,
|
|
126
|
+
deactivate
|
|
126
127
|
});
|
|
127
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
128
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxvQkFBK0c7QUFDL0csa0JBTU87QUFFUCx1QkFBbUM7QUFFbkMsTUFBTSxrQkFBd0UsSUFBSSx3QkFBWTtBQUU5RixJQUFJO0FBRUosd0JBQStCLFNBQTJCO0FBQ3pELFFBQU0sZUFBK0I7QUFFckMsUUFBTSxPQUFPO0FBQ2IsUUFBTSxlQUFlLENBQUUsVUFBVSxDQUFDLFlBQVksZUFBZTtBQ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HlCQUF1QjtBQUN0QixXQUFPO0FBQUE7QUFHUixTQUFPO0FBQUEsSUFDTixtQkFBbUI7QUFBQTtBQUFBO0FBSWQsc0JBQWlEO0FBQ3ZELE1BQUksQ0FBQyxRQUFRO0FBQ1osV0FBTztBQUFBO0FBR1IsU0FBTyxPQUFPO0FBQUE7QUFHZiw4QkFBOEIsZUFBOEIsZUFBc0M7QUFDakcsU0FBTyxJQUFJLDJCQUFlLFNBQVMsU0FBUyxlQUFlO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg==
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"color": "#FFBE2D",
|
|
9
9
|
"theme": "dark"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.16.
|
|
11
|
+
"version": "0.16.1",
|
|
12
12
|
"author": "withastro",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"publisher": "astro-build",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"workspaceContains:astro.config.*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@astrojs/language-server": "0.16.
|
|
29
|
+
"@astrojs/language-server": "0.16.1",
|
|
30
30
|
"@astrojs/ts-plugin": "0.2.1",
|
|
31
31
|
"vscode-languageclient": "~7.0.0"
|
|
32
32
|
},
|
|
@@ -77,77 +77,137 @@
|
|
|
77
77
|
"default": "off",
|
|
78
78
|
"description": "Traces the communication between VS Code and the language server."
|
|
79
79
|
},
|
|
80
|
-
"astro.
|
|
80
|
+
"astro.typescript.enabled": {
|
|
81
81
|
"type": "boolean",
|
|
82
82
|
"default": true,
|
|
83
83
|
"title": "TypeScript",
|
|
84
|
-
"description": "Enable
|
|
84
|
+
"description": "Enable TypeScript features"
|
|
85
85
|
},
|
|
86
|
-
"astro.
|
|
86
|
+
"astro.typescript.diagnostics.enabled": {
|
|
87
87
|
"type": "boolean",
|
|
88
88
|
"default": true,
|
|
89
89
|
"title": "TypeScript: Diagnostics",
|
|
90
90
|
"description": "Enable diagnostic messages for TypeScript"
|
|
91
91
|
},
|
|
92
|
-
"astro.
|
|
92
|
+
"astro.typescript.hover.enabled": {
|
|
93
93
|
"type": "boolean",
|
|
94
94
|
"default": true,
|
|
95
95
|
"title": "TypeScript: Hover Info",
|
|
96
96
|
"description": "Enable hover info for TypeScript"
|
|
97
97
|
},
|
|
98
|
-
"astro.
|
|
98
|
+
"astro.typescript.documentSymbols.enabled": {
|
|
99
99
|
"type": "boolean",
|
|
100
100
|
"default": true,
|
|
101
101
|
"title": "TypeScript: Symbols in Outline",
|
|
102
102
|
"description": "Enable document symbols for TypeScript"
|
|
103
103
|
},
|
|
104
|
-
"astro.
|
|
104
|
+
"astro.typescript.completions.enabled": {
|
|
105
105
|
"type": "boolean",
|
|
106
106
|
"default": true,
|
|
107
107
|
"title": "TypeScript: Completions",
|
|
108
108
|
"description": "Enable completions for TypeScript"
|
|
109
109
|
},
|
|
110
|
-
"astro.
|
|
111
|
-
"type": "boolean",
|
|
112
|
-
"default": true,
|
|
113
|
-
"title": "TypeScript: Find References",
|
|
114
|
-
"description": "Enable find-references for TypeScript"
|
|
115
|
-
},
|
|
116
|
-
"astro.plugin.typescript.definitions.enable": {
|
|
110
|
+
"astro.typescript.definitions.enabled": {
|
|
117
111
|
"type": "boolean",
|
|
118
112
|
"default": true,
|
|
119
113
|
"title": "TypeScript: Go to Definition",
|
|
120
114
|
"description": "Enable go to definition for TypeScript"
|
|
121
115
|
},
|
|
122
|
-
"astro.
|
|
116
|
+
"astro.typescript.codeActions.enabled": {
|
|
123
117
|
"type": "boolean",
|
|
124
118
|
"default": true,
|
|
125
119
|
"title": "TypeScript: Code Actions",
|
|
126
120
|
"description": "Enable code actions for TypeScript"
|
|
127
121
|
},
|
|
128
|
-
"astro.
|
|
129
|
-
"type": "boolean",
|
|
130
|
-
"default": true,
|
|
131
|
-
"title": "TypeScript: Selection Range",
|
|
132
|
-
"description": "Enable selection range for TypeScript"
|
|
133
|
-
},
|
|
134
|
-
"astro.plugin.typescript.signatureHelp.enable": {
|
|
122
|
+
"astro.typescript.signatureHelp.enabled": {
|
|
135
123
|
"type": "boolean",
|
|
136
124
|
"default": true,
|
|
137
125
|
"title": "TypeScript: Signature Help",
|
|
138
126
|
"description": "Enable signature help (parameter hints) for TypeScript"
|
|
139
127
|
},
|
|
140
|
-
"astro.
|
|
128
|
+
"astro.typescript.rename.enabled": {
|
|
141
129
|
"type": "boolean",
|
|
142
130
|
"default": true,
|
|
143
131
|
"title": "TypeScript: Rename",
|
|
144
132
|
"description": "Enable rename functionality for JS/TS variables inside Astro files"
|
|
145
133
|
},
|
|
146
|
-
"astro.
|
|
134
|
+
"astro.typescript.semanticTokens.enabled": {
|
|
147
135
|
"type": "boolean",
|
|
148
136
|
"default": true,
|
|
149
137
|
"title": "TypeScript: Semantic Tokens",
|
|
150
|
-
"description": "Enable semantic tokens (semantic
|
|
138
|
+
"description": "Enable semantic tokens (used for semantic highlighting) for TypeScript."
|
|
139
|
+
},
|
|
140
|
+
"astro.html.enabled": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"default": true,
|
|
143
|
+
"title": "HTML",
|
|
144
|
+
"description": "Enable HTML features"
|
|
145
|
+
},
|
|
146
|
+
"astro.html.hover.enabled": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"default": true,
|
|
149
|
+
"title": "HTML: Hover Info",
|
|
150
|
+
"description": "Enable hover info for HTML"
|
|
151
|
+
},
|
|
152
|
+
"astro.html.completions.enabled": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"default": true,
|
|
155
|
+
"title": "HTML: Completions",
|
|
156
|
+
"description": "Enable completions for HTML"
|
|
157
|
+
},
|
|
158
|
+
"astro.html.completions.emmet": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"default": true,
|
|
161
|
+
"title": "HTML: Emmet Completions",
|
|
162
|
+
"description": "Enable Emmet completions for HTML"
|
|
163
|
+
},
|
|
164
|
+
"astro.html.tagComplete.enabled": {
|
|
165
|
+
"type": "boolean",
|
|
166
|
+
"default": true,
|
|
167
|
+
"title": "HTML: Tag Completion",
|
|
168
|
+
"description": "Enable tag completion for HTML"
|
|
169
|
+
},
|
|
170
|
+
"astro.html.documentSymbols.enabled": {
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"default": true,
|
|
173
|
+
"title": "HTML: Symbols in Outline",
|
|
174
|
+
"description": "Enable document symbols for CSS"
|
|
175
|
+
},
|
|
176
|
+
"astro.css.enabled": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"default": true,
|
|
179
|
+
"title": "CSS",
|
|
180
|
+
"description": "Enable CSS features"
|
|
181
|
+
},
|
|
182
|
+
"astro.css.hover.enabled": {
|
|
183
|
+
"type": "boolean",
|
|
184
|
+
"default": true,
|
|
185
|
+
"title": "CSS: Hover Info",
|
|
186
|
+
"description": "Enable hover info for CSS"
|
|
187
|
+
},
|
|
188
|
+
"astro.css.completions.enabled": {
|
|
189
|
+
"type": "boolean",
|
|
190
|
+
"default": true,
|
|
191
|
+
"title": "CSS: Completions",
|
|
192
|
+
"description": "Enable completions for CSS"
|
|
193
|
+
},
|
|
194
|
+
"astro.css.completions.emmet": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"default": true,
|
|
197
|
+
"title": "CSS: Emmet Completions",
|
|
198
|
+
"description": "Enable Emmet completions for CSS"
|
|
199
|
+
},
|
|
200
|
+
"astro.css.documentColors.enabled": {
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"default": true,
|
|
203
|
+
"title": "CSS: Document Colors",
|
|
204
|
+
"description": "Enable color picker for CSS"
|
|
205
|
+
},
|
|
206
|
+
"astro.css.documentSymbols.enabled": {
|
|
207
|
+
"type": "boolean",
|
|
208
|
+
"default": true,
|
|
209
|
+
"title": "CSS: Symbols in Outline",
|
|
210
|
+
"description": "Enable document symbols for CSS"
|
|
151
211
|
}
|
|
152
212
|
}
|
|
153
213
|
},
|