mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(lsp): when prefix is non word add all result into matches (#30044)
Problem: prefix can be a symbol like period, the fuzzy matching can't handle it correctly. Solution: when prefix is empty or a symbol add all lsp completion result into matches.
This commit is contained in:
@@ -238,7 +238,7 @@ function M._lsp_to_complete_items(result, prefix, client_id)
|
||||
|
||||
---@type fun(item: lsp.CompletionItem):boolean
|
||||
local matches
|
||||
if prefix == '' then
|
||||
if not prefix:find('%w') then
|
||||
matches = function(_)
|
||||
return true
|
||||
end
|
||||
|
Reference in New Issue
Block a user