astro-vscode 0.16.0 → 0.18.0
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 +32 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -16
- package/package.json +97 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# astro-vscode
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d3c6fd8: Add support for formatting
|
|
8
|
+
- 09e1163: Updated language server to latest version of LSP, added support for Inlay Hints
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [d3c6fd8]
|
|
13
|
+
- Updated dependencies [09e1163]
|
|
14
|
+
- Updated dependencies [fcaba8e]
|
|
15
|
+
- Updated dependencies [4138005]
|
|
16
|
+
- Updated dependencies [76ff46a]
|
|
17
|
+
- @astrojs/language-server@0.18.0
|
|
18
|
+
|
|
19
|
+
## 0.17.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [3ad0f65]
|
|
24
|
+
- Updated dependencies [2e9da14]
|
|
25
|
+
- @astrojs/language-server@0.17.0
|
|
26
|
+
|
|
27
|
+
## 0.16.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [ad5a5e5]
|
|
32
|
+
- Updated dependencies [1bd790d]
|
|
33
|
+
- @astrojs/language-server@0.16.1
|
|
34
|
+
|
|
3
35
|
## 0.16.0
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
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,25 +45,16 @@ 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
|
-
|
|
63
|
-
|
|
64
|
-
client.onReady().then(() => {
|
|
56
|
+
client = createLanguageServer(serverOptions, clientOptions);
|
|
57
|
+
client.start().then(() => {
|
|
65
58
|
const tagRequestor = (document, position) => {
|
|
66
59
|
const param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
|
|
67
60
|
return client.sendRequest(TagCloseRequest, param);
|
|
@@ -103,8 +96,7 @@ async function activate(context) {
|
|
|
103
96
|
restartingClient = true;
|
|
104
97
|
await client.stop();
|
|
105
98
|
client = createLanguageServer(serverOptions, clientOptions);
|
|
106
|
-
|
|
107
|
-
await client.onReady();
|
|
99
|
+
await client.start();
|
|
108
100
|
if (showNotification) {
|
|
109
101
|
import_vscode.window.showInformationMessage("Astro language server restarted.");
|
|
110
102
|
}
|
|
@@ -117,11 +109,18 @@ async function activate(context) {
|
|
|
117
109
|
getLanguageServer: getLSClient
|
|
118
110
|
};
|
|
119
111
|
}
|
|
112
|
+
function deactivate() {
|
|
113
|
+
if (!client) {
|
|
114
|
+
return void 0;
|
|
115
|
+
}
|
|
116
|
+
return client.stop();
|
|
117
|
+
}
|
|
120
118
|
function createLanguageServer(serverOptions, clientOptions) {
|
|
121
119
|
return new import_node.LanguageClient("astro", "Astro", serverOptions, clientOptions);
|
|
122
120
|
}
|
|
123
121
|
// Annotate the CommonJS export names for ESM import in node:
|
|
124
122
|
0 && (module.exports = {
|
|
125
|
-
activate
|
|
123
|
+
activate,
|
|
124
|
+
deactivate
|
|
126
125
|
});
|
|
127
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
126
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxvQkFBK0c7QUFDL0csa0JBTU87QUFFUCx1QkFBbUM7QUFFbkMsTUFBTSxrQkFBd0UsSUFBSSx3QkFBWTtBQUU5RixJQUFJO0FBRUosd0JBQStCLFNBQTJCO0FBQ3pELFFBQU0sZUFBK0I7QUFFckMsUUFBTSxPQUFPO0FBQ2IsUUFBTSxlQUFlLENBQUUsVUFBVSxDQUFDLFlBQVksZUFBZTtBQUU3RCxRQUFNLG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FJZCxzQkFBaUQ7QUFDdkQsTUFBSSxDQUFDLFFBQVE7QUFDWixXQUFPO0FBQUE7QUFHUixTQUFPLE9BQU87QUFBQTtBQUdmLDhCQUE4QixlQUE4QixlQUFzQztBQUNqRyxTQUFPLElBQUksMkJBQWUsU0FBUyxTQUFTLGVBQWU7QUFBQTsiLAogICJuYW1lcyI6IFtdCn0K
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"color": "#FFBE2D",
|
|
9
9
|
"theme": "dark"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.18.0",
|
|
12
12
|
"author": "withastro",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"publisher": "astro-build",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"workspaceContains:astro.config.*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@astrojs/language-server": "0.
|
|
29
|
+
"@astrojs/language-server": "0.18.0",
|
|
30
30
|
"@astrojs/ts-plugin": "0.2.1",
|
|
31
|
-
"vscode-languageclient": "
|
|
31
|
+
"vscode-languageclient": "^8.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/glob": "^7.2.0",
|
|
@@ -77,77 +77,147 @@
|
|
|
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"
|
|
211
|
+
},
|
|
212
|
+
"astro.format.indentFrontmatter": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"default": true,
|
|
215
|
+
"title": "Formatting: Indent the frontmatter by one level of indentation"
|
|
216
|
+
},
|
|
217
|
+
"astro.format.newLineAfterFrontmatter": {
|
|
218
|
+
"type": "boolean",
|
|
219
|
+
"default": true,
|
|
220
|
+
"title": "Formatting: Add a line return between the frontmatter and the template"
|
|
151
221
|
}
|
|
152
222
|
}
|
|
153
223
|
},
|