@astrojs/language-server 2.16.4 → 2.16.6
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/dist/plugins/html.js +8 -1
- package/package.json +9 -9
package/dist/plugins/html.js
CHANGED
|
@@ -79,8 +79,15 @@ const create = () => {
|
|
|
79
79
|
const root = sourceScript?.generated?.root;
|
|
80
80
|
if (!(root instanceof index_js_1.AstroVirtualCode))
|
|
81
81
|
return;
|
|
82
|
+
const offset = document.offsetAt(position);
|
|
82
83
|
// Don't return completions if the current node is a component
|
|
83
|
-
if ((0, utils_js_1.isInComponentStartTag)(root.htmlDocument,
|
|
84
|
+
if ((0, utils_js_1.isInComponentStartTag)(root.htmlDocument, offset)) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
const currentNode = root.htmlDocument.findNodeAt(offset);
|
|
88
|
+
const sourceText = root.snapshot.getText(0, root.snapshot.getLength());
|
|
89
|
+
// Let the TypeScript service handle `{...}` expressions in HTML attributes.
|
|
90
|
+
if ((0, utils_js_1.isInsideExpression)(sourceText, currentNode.start, offset)) {
|
|
84
91
|
return null;
|
|
85
92
|
}
|
|
86
93
|
const completions = await htmlPluginInstance.provideCompletionItems(document, position, completionContext, token);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/language-server",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.6",
|
|
4
4
|
"author": "withastro",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@volar/language-service": "~2.4.28",
|
|
30
30
|
"muggle-string": "^0.4.1",
|
|
31
31
|
"tinyglobby": "^0.2.15",
|
|
32
|
-
"volar-service-css": "0.0.
|
|
33
|
-
"volar-service-emmet": "0.0.
|
|
34
|
-
"volar-service-html": "0.0.
|
|
35
|
-
"volar-service-prettier": "0.0.
|
|
36
|
-
"volar-service-typescript": "0.0.
|
|
37
|
-
"volar-service-typescript-twoslash-queries": "0.0.
|
|
38
|
-
"volar-service-yaml": "0.0.
|
|
39
|
-
"vscode-html-languageservice": "^5.6.
|
|
32
|
+
"volar-service-css": "0.0.70",
|
|
33
|
+
"volar-service-emmet": "0.0.70",
|
|
34
|
+
"volar-service-html": "0.0.70",
|
|
35
|
+
"volar-service-prettier": "0.0.70",
|
|
36
|
+
"volar-service-typescript": "0.0.70",
|
|
37
|
+
"volar-service-typescript-twoslash-queries": "0.0.70",
|
|
38
|
+
"volar-service-yaml": "0.0.70",
|
|
39
|
+
"vscode-html-languageservice": "^5.6.2",
|
|
40
40
|
"vscode-uri": "^3.1.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|