zed icon indicating copy to clipboard operation
zed copied to clipboard

Improve completions for TypeScript

Open babyccino opened this issue 10 months ago • 2 comments

Related to #5287

This is a WIP but I just wanted to check if this is something Zed would be interested in before I put more time into it. Basically what I've done is changed the LSP functionality so labels as well as documentation is updated from the LSP completionItem/resolve response.

Before: Screenshot 2024-04-19 at 7 19 07 PM

After: Screenshot 2024-04-19 at 7 18 51 PM

babyccino avatar Apr 19 '24 18:04 babyccino

The new labels look great. Could you explain a bit more about why the separate labels_for_resolved_completion method is needed?

maxbrunsfeld avatar Apr 19 '24 20:04 maxbrunsfeld

The new labels look great. Could you explain a bit more about why the separate labels_for_resolved_completion method is needed?

It's not completely necessary. You could definitely determine in the label function which kind of completion you're dealing with, but for the TS LSP (and maybe for others) the format is completely different depending on whether they are regular completions or resolved completions. I figured it was easier to do it this way and maybe there are some other LSPs where it's not so easy to differentiate.

babyccino avatar Apr 20 '24 00:04 babyccino

Warnings
:warning:

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- (Added|Fixed|Improved) ... ([#<public_issue_number_if_exists>](https://github.com/zed-industries/zed/issues/<public_issue_number_if_exists>)).

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by :no_entry_sign: dangerJS against f4022972f6d56c1c9758ce4f90e5ed764ea9c9e7

zed-industries-bot avatar May 03 '24 09:05 zed-industries-bot

Without having looked too closely at the code: @babyccino it might be worth checking against main and what has changed there, since I also changed the how we do completion item resolution: https://github.com/zed-industries/zed/pull/11157

mrnugget avatar May 03 '24 09:05 mrnugget

Hi @mikayla-maki, I'm curious what the status of this is? Is it ready to be merged?

jackTabsCode avatar Jun 19 '24 19:06 jackTabsCode

Hi @mikayla-maki, I'm curious what the status of this is? Is it ready to be merged?

I got distracted by #12106 so I haven't worked on this in a while. It's still in a very rough state and definitely not ready to be merged. If Zed is still interested in this I can work on it after #12106 is merged

babyccino avatar Jun 21 '24 15:06 babyccino

@babyccino I'm going to close for now, but please re-open when you get time to work on it!

ConradIrwin avatar Jul 10 '24 19:07 ConradIrwin