Wiring lsp config editor to update lspManagerService.lspConfigDataStr; removed redundant check; update lsp config
This commit is contained in:
parent
79adb86d25
commit
90c8c9b3ee
@ -37,6 +37,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"configuration": {
|
"configuration": {
|
||||||
|
"updateBuildConfiguration": "automatic",
|
||||||
"maven": {
|
"maven": {
|
||||||
"userSettings": "{user.home}/.config/jdtls/settings.xml",
|
"userSettings": "{user.home}/.config/jdtls/settings.xml",
|
||||||
"globalSettings": "{user.home}/.config/jdtls/settings.xml"
|
"globalSettings": "{user.home}/.config/jdtls/settings.xml"
|
||||||
|
@ -33,12 +33,13 @@ export class LspManagerService {
|
|||||||
public registerEditorToLSPClient(editor: any) {
|
public registerEditorToLSPClient(editor: any) {
|
||||||
let mode = this.getMode(editor.session);
|
let mode = this.getMode(editor.session);
|
||||||
|
|
||||||
if ( this.languageProviders[mode] ) {
|
this.languageProviders[mode]?.registerEditor(
|
||||||
this.languageProviders[mode].registerEditor(editor);
|
editor,
|
||||||
return;
|
{
|
||||||
|
filePath: editor.session["id"],
|
||||||
|
joinWorkspaceURI: true
|
||||||
}
|
}
|
||||||
|
);
|
||||||
this.languageProviders[mode]?.registerEditor(editor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getLspConfigData(): Promise<string> {
|
private getLspConfigData(): Promise<string> {
|
||||||
|
@ -55,6 +55,11 @@ export class LspManagerComponent {
|
|||||||
this.lspTextEditor = this.lspEditorComponent.editor;
|
this.lspTextEditor = this.lspEditorComponent.editor;
|
||||||
this.innerEditor = this.sessionEditorComponent.editor;
|
this.innerEditor = this.sessionEditorComponent.editor;
|
||||||
|
|
||||||
|
this.lspTextEditor.on("input", () => {
|
||||||
|
this.lspManagerService.lspConfigDataStr =
|
||||||
|
this.lspTextEditor.session.getValue();
|
||||||
|
});
|
||||||
|
|
||||||
this.lspManagerService.loadLspConfigData().then((lspConfigData) => {
|
this.lspManagerService.loadLspConfigData().then((lspConfigData) => {
|
||||||
this.lspTextEditor.session.setMode("ace/mode/json");
|
this.lspTextEditor.session.setMode("ace/mode/json");
|
||||||
this.lspTextEditor.session.setValue(lspConfigData);
|
this.lspTextEditor.session.setValue(lspConfigData);
|
||||||
|
Loading…
Reference in New Issue
Block a user