zed icon indicating copy to clipboard operation
zed copied to clipboard

Improve autocomplete suggestions for literal strings

Open znycheporuk opened this issue 11 months ago • 0 comments

Check for existing issues

  • [X] Completed

Describe the feature

In our TypeScript project, we utilize literal strings such as t("namespace.key") for translations. The autocomplete feature currently presents all possible options, regardless of the typed string.

For example, when t("errors.404.") is typed, it should ideally suggest only keys under errors.404.

At present, options beginning with errors.404. are not prioritized in the suggestions list. This can lead to inefficiencies in locating the correct keys.

A potential enhancement could be to refine the autocomplete feature to offer suggestions that are more closely aligned with the typed string, potentially improving the developer experience.

If applicable, add mockups / screenshots to help present your vision of the feature

Second half of the video shows how it's implemented in WebStorm

https://github.com/zed-industries/zed/assets/42861377/4705d181-9769-442b-b9f6-b6194ea344b9

znycheporuk avatar Mar 04 '24 20:03 znycheporuk