mirror of
https://github.com/neovim/neovim.git
synced 2026-02-23 19:02:13 +10: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