-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
Show deprecation warning in completion list #3480
Comments
coc.nvim already does this, if it comes as diagnostics warning/info, you can check that with typescript + coc-tsserver for example. What it doesn't do is this:
|
I realized that I wrote a little bit confusing description, sorry for that. So let me summarize; let me know if I said something wrong. There are at least three ways for Language Servers to tell that an item is deprecated:
And you said that the latter two is not entirely supported by coc.nvim. Is there already an issue that specifically ask for this kind of features in completion list? If there is, please close the issue; otherwise I'll leave it as a ticket of feature request. |
You can keep the ticket, there isn't an specific issue that covers either of the two latter ones.
Yes, it's that, and comes as "deprecated" semantic token "modifier". You most probably is pointing for completion tag, as the semantic token modifier would present itself in source code strikethrough highlighting. |
@TonalidadeHidrica okay. Notice a strikethrough over some pum items is in fact not possible due to vim/nvim limitation, pum doesn't support syntax highlighting. So the only way out (with pum) is by means of a glyph mark. |
To have that with completion you have to ditch vim/nvim native completion system and reimplement it through vim-popups/nvim-floating-windows, like nvim-cmp has done. |
Not too hard to implement completion pum by using float window or popup, but lots of details and break changes of how completion works. Vote for the feature if you really like it. |
Is your feature request related to a problem? Please describe.
When I choose an item from a completion list, not until a warning is shown that I realize that the selected item is actually deprecated.
Describe the solution you'd like⚠️ shown before the item, or a strikethrough over the item name.
I want a deprecation mark like
Describe alternatives you've considered
We may alternatively (or also) show that it is deprecated in the docs window shown when we pre-select the completion.
Additional context
Specifically I want this feature for rust-analyzer. I first asked
rust-analyzer
for this feature to be informed that the LSP already provides such diagnostic and is available in VSCode. (A screenshot is included in that issue.)The text was updated successfully, but these errors were encountered: