typescript-language-server
completions don't show expandable indicator until selected
#1665
Open
2 tasks done
Labels
bug
Something isn't working
FAQ
Announcement
Minimal reproducible full config
Description
See "Steps to reproduce"
Steps to reproduce
In a new directory:
tsconfig.json
:foo.ts
:In a new file
bar.ts
:console.
-> cycle through function completions.~
will only appear once an item has been selected:fn_completion.mp4
console.log(foo
-> cycle through auto-import completions.~
will only appear once an item has been selected:auto_import.mp4
Expected behavior
Should show
~
upfront in menuActual behavior
See "Steps to reproduce"
Additional context
In
typescript-language-server
you can tell upfront fromcompletionItem.data.entryNames[0].source
that there will be an auto-import, but this seems to be their internal convention and not an LSP convention.additionalTextEdits
is not populated until completion is resolved.Similarly, in
typescript-language-server
, function snippets do not updateinsertText
until completion resolve. But it does setInsertTextFormat.Snippet
upfront.So, I would propose that in:
nvim-cmp/lua/cmp/entry.lua
Lines 245 to 246 in c4e491a
the following change be made:
since I assume the indicator is supposed to indicate that you'll get a result which is different from just the label? But IDK how common this even is. The following might be preferable:
The text was updated successfully, but these errors were encountered: