-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add Scala support via Metals (Scala LSP) #6982
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @hmemcpy on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
I also have a branch here https://github.com/bishabosha/zed/tree/feature-add-scala where I use coursier to bootstrap metals, however projects are not being recognised so I think we need some more custom hooks |
Ah, looks like there's another PR coming soon with those features implemented. So I'm closing this! |
On my side it really seems like Zed is not receiving LSP requests from the client, only notifications (doing a lot of print debugging) - or at least it registers a handler for |
@bishabosha I figured out the problem with the LSP communication - the code in lsp.rs expects int as request's id, but the spec allows int or string and Metals uses strings. I made a quick and dirty effort to implement it, successfully, Metals seems to be correctly building and reporting errors now, but my Rust knowledge is basically none, so I'd need someone to take a look at it. The code is in my fork, if anyone would be willing to take a look: https://github.com/mprihoda/zed/tree/wip/zed-scala Not ready for a pull request yet. |
Nice, super glad you found that! perhaps we can all collab on one fork? |
I just made #7568 to gather feedback. And sure, pooling our efforts into one fork might make things faster. |
The Scala language support!
This uses the official Metals LSP server.
(this is still WIP because I need to download the LSP binary, and make sure all the brackets are correctly highlighted/inserted)