zed-extensions / kotlin

Syntax highlighting for Kotlin in Zed.
MIT License
23 stars 10 forks source link

LSP support #8

Closed cholwell closed 6 months ago

cholwell commented 7 months ago

https://github.com/zed-extensions/kotlin/issues/1

Use https://github.com/fwcd/kotlin-language-server

https://github.com/zed-extensions/zed-kotlin/assets/53612993/5575682b-cf0d-417e-8f2c-afe4c109587d

cholwell commented 7 months ago

I'm not sure what the deal is with windows support but I cant test it so I didn't try do anything with it

there is a windows executable in the asset though so presumably would be easy to do

cholwell commented 6 months ago

@evrsen @osiewicz @spaceunifyfifty please could someone review?

cholwell commented 6 months ago

some notes:

I will investigate these and follow up separately

@osiewicz I re requested review let me know if there is anything else 🙂

osiewicz commented 6 months ago

For the Zed extension API bump, it looks like you're using zed::LanguageServerConfig to grab the name of a language server, which should be "Kotlin Language Server" based on extension.toml. I don't love hardcoding stuff, but this seems relatively straightforward?

maxdeviant commented 6 months ago

For the Zed extension API bump, it looks like you're using zed::LanguageServerConfig to grab the name of a language server, which should be "Kotlin Language Server" based on extension.toml. I don't love hardcoding stuff, but this seems relatively straightforward?

It doesn't need to be hard-coded.

The LanguageServerId is intended to replace the name field from LanguageServerConfig.

Here's an example of another extension adapting to the API changes in v0.0.6: https://github.com/zed-industries/zed/pull/10481

We will want to code against v0.0.6, since that is that latest version of the extension API.

cholwell commented 6 months ago

It doesn't need to be hard-coded.

The LanguageServerId is intended to replace the name field from LanguageServerConfig.

Here's an example of another extension adapting to the API changes in v0.0.6: zed-industries/zed#10481

We will want to code against v0.0.6, since that is that latest version of the extension API.

makes sense, thanks for the reference d2004227621a62d03939a753c252917fe23e8ecd

cholwell commented 6 months ago

who has merge powers 👀

fl-w commented 6 months ago

@evrsen Could you take a look at this and merge if happy.

Thanks

nervenes commented 6 months ago

Hey! I'm fine with all options regarding the author section, whether be it removed completely, replaced with contributors, changing the author or leaving it as is. I'm not sure if I'm the only person here with merge permissions, but I transfered this repository to @zed-extensions because I have no interest nor time to maintain it, so i ask someone to take over this position completely.

I also don't have enough rust knowledge to verify the code is working properly and i cba to manually test an extension i'm no longer interested in maintaining. I'm assuming a few people have already verified the changes to be working, and given this is a long awaited feature i'll go ahead and merge just this time.

Hope y'all understand, thanks.