clseibold / zed-odin

Odin language support for Zed
MIT License
7 stars 2 forks source link

label details support #1

Open ryuukk opened 3 months ago

ryuukk commented 3 months ago

Hello

OLS supports labelDetails, but zed doesn't show them by default

It needs to come from the zed plugin itself (yes i know this is retarded)

So you need to implement a function (wich one? only god knows)

If you feel courageous https://github.com/zed-industries/zed/pull/13667

maxdeviant commented 3 months ago

It needs to come from the zed plugin itself (yes i know this is retarded)

This is offensive and uncalled for.

Just because you don't agree with how Zed processes completions from language servers doesn't give you license to say things like this.

So you need to implement a function (wich one? only god knows)

The function that needs to be implemented is label_for_completion on the Extension trait.

We have a number of examples of this in the extensions hosted in the Zed repo, such as this one: https://github.com/zed-industries/zed/blob/83592306c519266814cacdf8a6abfed6b283c01d/extensions/gleam/src/gleam.rs#L113-L147.

ryuukk commented 3 months ago

Just because you don't agree with how Zed processes completions from language servers doesn't give you license to say things like this.

Brother, you are the one who do not respect the spec, and you expect the world to bow to your stupid design

You either follow the spec, or you call it something else

Stupid design should be called out, you either do it right, or you bear the result of chaos

Yet again, i suggest you to read the spec https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemLabelDetails

clseibold commented 2 months ago

Thanks @maxdeviant . I will look into that and implement it when I have time.

ryuukk commented 2 months ago

Brother, your extension API doesn't even let you access labelDetails https://docs.rs/zed_extension_api/0.0.6/zed_extension_api/lsp/struct.Completion.html