-
-
Notifications
You must be signed in to change notification settings - Fork 389
Implement completionItem/resolve
for more completion types
#3535
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
Comments
Upon investigation, this may be a non-issue. From my investigation, plugin authors can already use completionItem/resolve by making a plugin handler for the SCompletionItemResolve type. Furthermore, the pragmas plugin is the only other plugin offering completion, and that plugin does not provide anything for the detail or documentation fields of completionItem, which are the fields that completionItem/resolve is built to provide. From the spec:
For these reasons, I believe this issue can be closed. |
Right, it's indeed unclear whether any of the actual completions implementations that we have will benefit from this, since most of them are cheap. Pragmas are cheap, probably whatever we end up with for the cabal plugin will be cheap, it's really only the primary Haskell completions that are expensive, and there it's already implemented.
Right, the issue is that (IMO) it's not terribly easy to do. All the
Maybe there's nothing really to do here, and we just need some examples for people to follow, but I wonder if we could make it easier, even by just giving people a little interface to implement that gives them both, e.g.
which would compute a serializable key for every completion item, stick it in the |
I'll leave the issue open for now, but probably not much to do here. |
I am not sure if this is a bug in coc.nvim or in HLS [2.1.0.0], since I would class it as a "protocol misunderstanding/disagreement". But: completions are not getting documentation from HLS because HLS promises to have resolveable completions, but then errors the request instead of returning the same documentation that was sent in the Again, don't know whose bug this is, but HLS is on the scene with odd behaviour.
Probable cause inside of coc.nvim: |
Confirmed this is the problem by crudely ripping out the code from coc.nvim that performs the |
I think we mostly did this |
Yes I know, they told me. |
For at least one bit of the improvement we need a new |
How to stop this "SMethod_CompletionItemResolve" warning? It's really really annoying. Edit: Apparently it was fixed in #4478, which was merged recently and hasn't been released yet. |
LSP allows you to implement
completionItem/resolve
to delay the computation of some parts of completion items. The advantages are similar to #3534, but mostly it's about avoiding expensive computation.We got support for
completionItem/resolve
for Haskell completions in #3204, but we have other completion providers e.g. the pragmas plugin. It would be good to implementcompletionItem/resolve
in more places.As with #3534, doing this properly would mean figuring out a way to make it easy for plugin authors to opt into it.
The text was updated successfully, but these errors were encountered: