Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Jan 18, 2025
1 parent 127358d commit a21b57f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lua/internal/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ local function auto_trigger(bufnr, client)
'triggerCharacters'
) or {}
if vim.v.char:match('[%w_]') and not vim.list_contains(triggerchars, vim.v.char) then
completion.trigger()
vim.schedule(function()
completion.trigger()
end)
end
end,
})
Expand Down
4 changes: 3 additions & 1 deletion lua/internal/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ function server.create()
for _, line in ipairs(root[filename]) do
local item = vim.split(line, '%s', { trimempty = true })
for _, word in ipairs(item) do
data[#data + 1] = word
if not vim.list_contains(data, word) then
table.insert(data, word)
end
end
end
end
Expand Down

0 comments on commit a21b57f

Please sign in to comment.