You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CompletionItem data is not preserved between onCompletion and resolve if 0 #351
CompletionItem.data is supposed to be preserved between the textDocument/completion and completionItem/resolve requests, but if its value is 0, this is not the case:
I modified the lsp-sample to demonstrate the problem (tested with vscode-languageclient 4.1.3):
This should either be fixed or at least be documented appropriately. For now this can be worked around by creating a wrapper object (data: {index: 0}).
Background: in the Haxe Language Server, we ran into an issue where after implementing completionItem/resolve, the first item in the list didn't show any documentation and threw an error regarding data being undefined in the output channel. We were using data to store the index the item had when it's returned to us from the Haxe compiler, so we can request more info on that item in resolve.
Activity
dbaeumer commentedon May 22, 2018
Good catch.
Test microsoft#351 to ensure that CompletionItem data is preserved
Test microsoft#351 to ensure that CompletionItem data is preserved
Merge pull request #352 from rcjsuen/empty-data