@likec4/language-server 1.36.0 → 1.36.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/dist/bundled.mjs +837 -837
- package/dist/workspace/LangiumDocuments.js +1 -1
- package/dist/workspace/ProjectsManager.js +17 -6
- package/package.json +6 -6
|
@@ -16,7 +16,7 @@ export class LangiumDocuments extends DefaultLangiumDocuments {
|
|
|
16
16
|
if (!isLikeC4LangiumDocument(doc) || isLikeC4Builtin(doc.uri)) {
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
|
-
doc.likec4ProjectId
|
|
19
|
+
doc.likec4ProjectId = projects.belongsTo(doc.uri);
|
|
20
20
|
return true;
|
|
21
21
|
});
|
|
22
22
|
}
|
|
@@ -44,7 +44,9 @@ export class ProjectsManager {
|
|
|
44
44
|
name: ProjectsManager.DefaultProjectId,
|
|
45
45
|
exclude: ["**/node_modules/**/*"]
|
|
46
46
|
},
|
|
47
|
-
exclude: picomatch("**/node_modules/**/*"
|
|
47
|
+
exclude: picomatch("**/node_modules/**/*", {
|
|
48
|
+
dot: true
|
|
49
|
+
})
|
|
48
50
|
};
|
|
49
51
|
/**
|
|
50
52
|
* Returns:
|
|
@@ -70,11 +72,17 @@ export class ProjectsManager {
|
|
|
70
72
|
getProject(arg) {
|
|
71
73
|
const id = typeof arg === "string" ? arg : arg.likec4ProjectId || this.belongsTo(arg);
|
|
72
74
|
if (id === ProjectsManager.DefaultProjectId) {
|
|
73
|
-
|
|
75
|
+
let folder2;
|
|
76
|
+
try {
|
|
77
|
+
folder2 = this.services.workspace.WorkspaceManager.workspaceUri;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
logger.warn("Failed to get workspace URI, using default folder", { error });
|
|
80
|
+
folder2 = URI.file("");
|
|
81
|
+
}
|
|
74
82
|
return {
|
|
75
|
-
id,
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
id: ProjectsManager.DefaultProjectId,
|
|
84
|
+
config: this.defaultGlobalProject.config,
|
|
85
|
+
folder: folder2
|
|
78
86
|
};
|
|
79
87
|
}
|
|
80
88
|
const {
|
|
@@ -166,7 +174,9 @@ ${loggable(error)}`
|
|
|
166
174
|
if (isNullish(config.exclude)) {
|
|
167
175
|
project.exclude = this.defaultGlobalProject.exclude;
|
|
168
176
|
} else if (hasAtLeast(config.exclude, 1)) {
|
|
169
|
-
project.exclude = picomatch(config.exclude
|
|
177
|
+
project.exclude = picomatch(config.exclude, {
|
|
178
|
+
dot: true
|
|
179
|
+
});
|
|
170
180
|
}
|
|
171
181
|
this._projects = pipe(
|
|
172
182
|
[...this._projects, project],
|
|
@@ -176,6 +186,7 @@ ${loggable(error)}`
|
|
|
176
186
|
);
|
|
177
187
|
this.projectIdToFolder.set(id, folder);
|
|
178
188
|
logger.info`register project ${id} folder: ${folder}`;
|
|
189
|
+
this.mappingsToProject.clear();
|
|
179
190
|
return project;
|
|
180
191
|
}
|
|
181
192
|
belongsTo(document) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/language-server",
|
|
3
3
|
"description": "LikeC4 Language Server",
|
|
4
|
-
"version": "1.36.
|
|
4
|
+
"version": "1.36.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
"vscode-uri": "3.1.0",
|
|
134
134
|
"which": "^5.0.0",
|
|
135
135
|
"zod": "3.25.67",
|
|
136
|
-
"@likec4/
|
|
137
|
-
"@likec4/
|
|
138
|
-
"@likec4/
|
|
139
|
-
"@likec4/log": "1.36.
|
|
140
|
-
"@likec4/
|
|
136
|
+
"@likec4/layouts": "1.36.1",
|
|
137
|
+
"@likec4/core": "1.36.1",
|
|
138
|
+
"@likec4/icons": "1.36.1",
|
|
139
|
+
"@likec4/log": "1.36.1",
|
|
140
|
+
"@likec4/tsconfig": "1.36.1"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"typecheck": "tsc -b --verbose",
|