WIP lsp-manager effort 5

This commit is contained in:
2025-07-13 13:47:38 -05:00
parent fd60b42f91
commit 577987244d
3 changed files with 8 additions and 8 deletions

View File

@@ -178,11 +178,6 @@ export class CodeViewBase {
} }
public closeFile() { public closeFile() {
let message = new ServiceMessage();
message.action = "close-file";
message.rawData = this.editor.getSession();
this.lspManagerService.sendMessage(message);
this.tabsService.closeTab(this.activeFile.path); this.tabsService.closeTab(this.activeFile.path);
} }

View File

@@ -139,6 +139,7 @@ export class EditorsComponent {
} }
} }
activeComponent.lspManagerService.closeDocument(file.session);
this.filesService.delete(file); this.filesService.delete(file);
} }
@@ -192,7 +193,7 @@ export class EditorsComponent {
}); });
window.fs.onUpdateFilePath(async (path: string) => { window.fs.onUpdateFilePath(async (path: string) => {
console.log(path); console.log("TODO (onUpdateFilePath) :", path);
// this.tabsService.sendMessage(message); // this.tabsService.sendMessage(message);
// this.filesService.sendMessage(message); // this.filesService.sendMessage(message);
}); });

View File

@@ -98,12 +98,12 @@ export class LspManagerComponent {
public registerEditorToLanguageClient() { public registerEditorToLanguageClient() {
this.lspManagerService.registerEditorToLSPClient(this.editor); this.lspManagerService.registerEditorToLSPClient(this.editor);
/*
this.lspManagerService.setSessionFilePath( this.lspManagerService.setSessionFilePath(
this.editor.session, this.editor.session,
this.activeFile.path this.activeFile.path
); );
*/
} }
@@ -139,13 +139,17 @@ export class LspManagerComponent {
} }
private editorUpdate(message: ServiceMessage) { private editorUpdate(message: ServiceMessage) {
if (!message.rawData.activeFile) return;
this.editor.setSession(message.rawData.editor.getSession()) this.editor.setSession(message.rawData.editor.getSession())
this.activeFile = message.rawData.activeFile; this.activeFile = message.rawData.activeFile;
/*
this.lspManagerService.setSessionFilePath( this.lspManagerService.setSessionFilePath(
this.editor.session, this.editor.session,
this.activeFile.path this.activeFile.path
); );
*/
} }