Multiple provider through websocket #80
-
Is it possible to use multiple languages provider through websocket for eg: python (through pylsp ) & svelte. In my case , here only one Editor but dynamically I update the mode of file, how can I use here ? Is there any guide for this? Because i have tried like this (but failed): import { AceLanguageClient } from "ace-linters/build/ace-language-client";
const lspServers = {
"python": "ws://localhost:3000",
// more language provider
};
const activeLSPConection = {};
if (activeLSPConnections[language]) {
return this.activeLSPConnections[language];
}
const lspUrl = lspServers[language];
if (!lspUrl) {
return;
}
let socket = new WebSocket(lspUrl);
const languageProvider = AceLanguageClient.for(socket);
activeLSPConnections[language] = socket;
languageProvider.setGlobalOptions("python", {
pylsp: {/* configuration */},
});
languageProvider.registerEditor(editor);
window.registerFormatter("python-lsp-formatter", ["py"], () => {
languageProvider.format();
});
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
For the |
Beta Was this translation helpful? Give feedback.
You could utilize this bridge . This should make it. It could be done on frontend, but right now it's not priority for me.