Skip to content

Commit 5f3256f

Browse files
fix(lsp): Add textEdit to completion
1 parent 668fd60 commit 5f3256f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lua/orgmode/lsp/handlers.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ OrgLspHandlers[methods.textDocument_completion] = function(params)
6666
return {
6767
label = item.word,
6868
labelDetails = item.menu and { description = item.menu } or nil,
69+
textEdit = {
70+
newText = item.word,
71+
range = {
72+
start = { line = params.position.line, character = offset - 1 },
73+
['end'] = { line = params.position.line, character = params.position.character },
74+
},
75+
},
6976
}
7077
end, completion)
7178

0 commit comments

Comments
 (0)