microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
39.78k stars 3.55k forks source link

Integrating a vscode lsp extension #4324

Closed nnWhisperer closed 7 months ago

nnWhisperer commented 8 months ago

Context

Description

In the readme FAQ, it says that

Note: If the extension is fully based on the LSP and if the language server is authored in JavaScript, then it would be possible.

So, my request should be possible to do: I'd like to use the lsp vscode clangd extension and possibly several other python lsp etc extensions inside monica editor. I read some parts of the vscode source code to see how it loads extensions etc. But we don't need to load the extension and register it etc, we may just copy the repo into a folder and reference it on a typescript file along with monaco-editor library and it must be almost ready to go. Since such a tool exists and is maintained, I'd like to use its lsp interaction with monica editor. I think that being able to integrate them will open up new use cases. I'm not a typescript developer, so, may be you could look at and prepare such a sample or a unittest that would help other interested people. Thank you

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

nnWhisperer commented 8 months ago

I even found an discussion between developers here that it would be a great feature being able to use an lsp server with monaco (tsserver), made under a merge: https://github.com/microsoft/monaco-editor/pull/3554#issuecomment-1436721640

CGNonofr commented 7 months ago

You may be interrested by https://github.com/TypeFox/monaco-languageclient or https://github.com/CodinGame/monaco-vscode-api