This repository was archived by the owner on Oct 9, 2024. It is now read-only.
Empty newText value for menu items in doCompletion #312
fredericgiquel
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed a weird behavior for modules completion in Emacs. If the documentation of the selected item is not shown, the completion result is deleted/empty.
I first tried to understand if the problem came from the Emacs side. By enabling trace mode of lsp-mode and examing the logs, I saw that :
textEdit.newTextvalue is an empty string intextDocument/completionresponse (for all module items)textEdit.newTextvalue is<module_name>\n\nincompletionItem/resolveresponseAccording to https://microsoft.github.io/language-server-protocol/specification#textDocument_completion,
textDocument/completionandcompletionItem/resolvemust provided same values for all properties (except fordetailanddocumentation).So I wrote a quick workaround by copying code from
doCompletionResolvefunction todoCompletion. You can see it here : fredericgiquel@20f19a0It fixes the problem in Emacs.
I can open a PR if you want. But this is perhaps a better idea to do a refactoring in order to avoid replicating code between the 2 functions and to be sure there are no other similar problems. But I'm not able to do it.
PS. The problem can be reproduce in VSCodium:
=> the completion is empty
Beta Was this translation helpful? Give feedback.
All reactions