completionItem: {
documentationFormat: ['markdown', 'plaintext'],
resolveSupport: {properties: ['detail', 'documentation']},
- snippetSupport: opt.lspOptions.snippetSupport
+ snippetSupport: opt.lspOptions.snippetSupport,
+ insertReplaceSupport: false
},
completionItemKind: {valueSet: range(1, 25)}
},
var d: dict<any> = {}
# TODO: Add proper support for item.textEdit.newText and
- # item.textEdit.range Keep in mind that item.textEdit.range can start be
+ # item.textEdit.range. Keep in mind that item.textEdit.range can start
# way before the typed keyword.
if item->has_key('textEdit') &&
lspOpts.completionMatcherValue != opt.COMPLETIONMATCHER_FUZZY
start_charcol = chcol
endif
var textEdit = item.textEdit
+ var textEditRange: dict<any> = {}
+ if textEdit->has_key('range')
+ textEditRange = textEdit.range
+ elseif textEdit->has_key('insert')
+ textEditRange = textEdit.insert
+ endif
var textEditStartCol =
- util.GetCharIdxWithoutCompChar(bufnr(), textEdit.range.start)
+ util.GetCharIdxWithoutCompChar(bufnr(), textEditRange.start)
if textEditStartCol != start_charcol
var offset = start_charcol - textEditStartCol - 1
d.word = textEdit.newText[offset : ]