@rohal12/spindle-lsp 0.3.1 → 0.3.2
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/bin.js +8 -2
- package/dist/bin.js.map +2 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1048,6 +1048,8 @@ var init_workspace_model = __esm({
|
|
|
1048
1048
|
this.macros = new MacroRegistry();
|
|
1049
1049
|
this.variables = new VariableTracker();
|
|
1050
1050
|
this.widgets = new WidgetRegistry();
|
|
1051
|
+
this.macros.loadBuiltins();
|
|
1052
|
+
this.macros.loadSupplements(macro_supplements_default);
|
|
1051
1053
|
this.onDocumentChanged = (uri) => this.handleDocumentChange(uri);
|
|
1052
1054
|
this.onDocumentOpened = (uri) => this.handleDocumentChange(uri);
|
|
1053
1055
|
this.onDocumentClosed = (uri) => this.handleDocumentClose(uri);
|
|
@@ -1060,8 +1062,6 @@ var init_workspace_model = __esm({
|
|
|
1060
1062
|
* Loads all file contents, builds indices, and emits 'modelReady'.
|
|
1061
1063
|
*/
|
|
1062
1064
|
initialize(fileContents) {
|
|
1063
|
-
this.macros.loadBuiltins();
|
|
1064
|
-
this.macros.loadSupplements(macro_supplements_default);
|
|
1065
1065
|
this.documents.removeListener("documentOpened", this.onDocumentOpened);
|
|
1066
1066
|
this.documents.removeListener("documentChanged", this.onDocumentChanged);
|
|
1067
1067
|
for (const [uri, text] of fileContents) {
|
|
@@ -4860,6 +4860,7 @@ function startServer(_args) {
|
|
|
4860
4860
|
let activePlugins = [];
|
|
4861
4861
|
let workspaceRoot;
|
|
4862
4862
|
connection.onInitialize((params) => {
|
|
4863
|
+
console.error("[spindle-lsp] onInitialize called");
|
|
4863
4864
|
const initOptions = params.initializationOptions ?? {};
|
|
4864
4865
|
workspaceRoot = initOptions.workspaceRoot ?? (params.workspaceFolders?.[0]?.uri ? uriToFsPath(params.workspaceFolders[0].uri) : void 0);
|
|
4865
4866
|
const projectConfig = workspaceRoot ? loadConfigFromDisk(workspaceRoot) : { macros: {} };
|
|
@@ -4869,12 +4870,15 @@ function startServer(_args) {
|
|
|
4869
4870
|
workspaceRoot
|
|
4870
4871
|
};
|
|
4871
4872
|
workspace = new WorkspaceModel();
|
|
4873
|
+
console.error("[spindle-lsp] workspaceRoot:", workspaceRoot ?? "undefined");
|
|
4872
4874
|
activePlugins = loadPlugins(allPlugins, config);
|
|
4875
|
+
console.error("[spindle-lsp] plugins loaded:", activePlugins.map((p) => p.id).join(", "));
|
|
4873
4876
|
for (const plugin of activePlugins) {
|
|
4874
4877
|
plugin.initialize({ connection, workspace, config });
|
|
4875
4878
|
}
|
|
4876
4879
|
if (Object.keys(projectConfig.macros).length > 0) {
|
|
4877
4880
|
workspace.macros.loadSupplements(projectConfig.macros);
|
|
4881
|
+
console.error("[spindle-lsp] loaded config macros:", Object.keys(projectConfig.macros).length);
|
|
4878
4882
|
}
|
|
4879
4883
|
return {
|
|
4880
4884
|
capabilities: buildCapabilities(activePlugins)
|
|
@@ -4893,7 +4897,9 @@ function startServer(_args) {
|
|
|
4893
4897
|
});
|
|
4894
4898
|
if (workspace) {
|
|
4895
4899
|
const fileContents = await scanWorkspaceFiles(workspaceRoot);
|
|
4900
|
+
console.error("[spindle-lsp] onInitialized: scanned", fileContents.size, "files from root:", workspaceRoot ?? "undefined");
|
|
4896
4901
|
workspace.initialize(fileContents);
|
|
4902
|
+
console.error("[spindle-lsp] workspace initialized, macros:", workspace.macros.getAllMacros().length, "warnings:", workspace.macros.warnings);
|
|
4897
4903
|
}
|
|
4898
4904
|
});
|
|
4899
4905
|
connection.onDidOpenTextDocument(({ textDocument }) => {
|