mirror of
https://github.com/neovim/neovim.git
synced 2026-10-26 15:40:20 -05:00
fix(lsp): use entire line as completion word (#37949)
This commit is contained in:
1 parent
0e4fa55200
commit
6fe68abdf5
1 file changed
+2
-1
@@ -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