mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 21:02:11 +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
|
||||
elseif item.textEdit then
|
||||
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
|
||||
return item.insertText
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user