suren-atoyan / monaco-react

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
https://monaco-react.surenatoyan.com/
MIT License
3.51k stars 258 forks source link

How to add an LSP for Solidity? #600

Open izcoser opened 3 months ago

izcoser commented 3 months ago

I would like to know how would I go about adding an LSP to my Monaco Editor, preferably using this project.

To those who don't know, an lsp is a language service provider which gives you popups as pictured below and tell you where the problems with your code are.

image

By the way, screenshot above is from Remix IDE, a browser based Ethereum focused IDE which also uses Monaco Editor.

suren-atoyan commented 3 months ago

@izcoser you want to write a custom LSP or integrate an existing one?

dddcxy commented 3 months ago

@izcoser you want to write a custom LSP or integrate an existing one?

@izcoser you want to write a custom LSP or integrate an existing one?

how to integrate an existing one? I want to add LSP to support vue syntax.

izcoser commented 3 months ago

@izcoser you want to write a custom LSP or integrate an existing one?

Sorry @suren-atoyan I didn't get a notification. I would like to integrate an existing one but I'm not sure how that would even work. For example I know the Solidity compiler has an --lsp flag in which it just idles and waits for input, no idea what to do with it.

If you could point me to how to integrate an existing lsp to monaco-react, it would help a lot.