This repository has been 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
-
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.newText
value is an empty string intextDocument/completion
response (for all module items)textEdit.newText
value is<module_name>\n\n
incompletionItem/resolve
responseAccording to https://microsoft.github.io/language-server-protocol/specification#textDocument_completion,
textDocument/completion
andcompletionItem/resolve
must provided same values for all properties (except fordetail
anddocumentation
).So I wrote a quick workaround by copying code from
doCompletionResolve
function 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