fix(lsp): fallback to label for completion items if all others are missing (#29522)

This commit is contained in:
Sebastian Lyng Johansen
2024-07-02 18:27:51 +02:00
committed by GitHub
parent cb84cd5d9f
commit aec7f1979a
2 changed files with 28 additions and 1 deletions

View File

@@ -176,7 +176,7 @@ local function apply_defaults(item, defaults)
if defaults.editRange then
local textEdit = item.textEdit or {}
item.textEdit = textEdit
textEdit.newText = textEdit.newText or item.textEditText or item.insertText
textEdit.newText = textEdit.newText or item.textEditText or item.insertText or item.label
if defaults.editRange.start then
textEdit.range = textEdit.range or defaults.editRange
elseif defaults.editRange.insert then