Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add an LSP for Solidity? #600

Open
izcoser opened this issue Mar 22, 2024 · 4 comments
Open

How to add an LSP for Solidity? #600

izcoser opened this issue Mar 22, 2024 · 4 comments

Comments

@izcoser
Copy link

izcoser commented Mar 22, 2024

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
Copy link
Owner

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

@dddcxy
Copy link

dddcxy commented Apr 8, 2024

@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
Copy link
Author

izcoser commented Apr 8, 2024

@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.

@NGC2207
Copy link

NGC2207 commented Dec 28, 2024

@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.

I saw your issue about integrating an LSP for Solidity with Monaco Editor. I’m currently working on a similar task and wanted to check if you’ve made any progress on it. Specifically, I’ve successfully integrated an LSP using @typefox/monaco-editor, but I’m having trouble porting it to @monaco-editor/react. Have you managed to get it working with @monaco-editor/react? If so, could you share any tips or code snippets that might help?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants