@astrojs/language-server 1.0.4 → 1.0.8
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.
|
@@ -67,9 +67,10 @@ exports.getLanguageServiceForTsconfig = getLanguageServiceForTsconfig;
|
|
|
67
67
|
async function createLanguageService(tsconfigPath, docContext, workspaceUris) {
|
|
68
68
|
const tsconfigRoot = tsconfigPath ? (0, path_1.dirname)(tsconfigPath) : process.cwd();
|
|
69
69
|
const workspacePaths = workspaceUris.map((uri) => (0, utils_1.urlToPath)(uri));
|
|
70
|
-
const workspacePath = workspacePaths.find((
|
|
70
|
+
const workspacePath = workspacePaths.find((p) => tsconfigRoot.startsWith(p)) || workspacePaths[0];
|
|
71
71
|
const astroInstall = (0, utils_1.getAstroInstall)([tsconfigRoot, workspacePath]);
|
|
72
|
-
const
|
|
72
|
+
const workspaceUri = workspacePath ? (0, utils_1.pathToUrl)(workspacePath) : '';
|
|
73
|
+
const config = (await docContext.configManager.getConfig('astro.typescript', workspaceUri)) ?? {};
|
|
73
74
|
const allowArbitraryAttrs = config.allowArbitraryAttributes ?? false;
|
|
74
75
|
// `raw` here represent the tsconfig merged with any extended config
|
|
75
76
|
const { compilerOptions, fileNames: files, raw: fullConfig } = getParsedTSConfig();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/language-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"author": "withastro",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"types"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@astrojs/compiler": "^1.4.
|
|
22
|
+
"@astrojs/compiler": "^1.4.2",
|
|
23
23
|
"@jridgewell/trace-mapping": "^0.3.14",
|
|
24
24
|
"@vscode/emmet-helper": "^2.8.4",
|
|
25
25
|
"events": "^3.3.0",
|
|
26
26
|
"prettier": "^2.8.8",
|
|
27
|
-
"prettier-plugin-astro": "^0.
|
|
27
|
+
"prettier-plugin-astro": "^0.9.1",
|
|
28
28
|
"vscode-css-languageservice": "^6.2.1",
|
|
29
29
|
"vscode-html-languageservice": "^5.0.0",
|
|
30
30
|
"vscode-languageserver": "^8.0.1",
|