mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 05:10:36 +00:00
fix(lsp): use entire line as completion word (#37949)
This commit is contained in:
@@ -191,7 +191,8 @@ local function get_completion_word(item, prefix, match)
|
|||||||
end
|
end
|
||||||
elseif item.textEdit then
|
elseif item.textEdit then
|
||||||
local word = item.textEdit.newText
|
local word = item.textEdit.newText
|
||||||
return word:match('^(%S*)') or word
|
word = string.gsub(word, '\r\n?', '\n')
|
||||||
|
return word:match('([^\n]*)') or word
|
||||||
elseif item.insertText and item.insertText ~= '' then
|
elseif item.insertText and item.insertText ~= '' then
|
||||||
return item.insertText
|
return item.insertText
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user