Skip to content

Commit

Permalink
fix(blink): complete the extra mod names only
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 1, 2024
1 parent 74443e2 commit d580089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazydev/integrations/blink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ function M:get_completions(ctx, callback)
---@param modpath string
local function add(modname, modpath)
local word = forward_slash and modname:gsub("%.", "/") or modname
local parts = vim.split(modname, ".", { plain = true })
local last = parts[#parts] or modname
items[modname] = items[modname]
or {
label = word,
kind = vim.lsp.protocol.CompletionItemKind.Module,
insertTextFormat = vim.lsp.protocol.InsertTextFormat.PlainText,
insertText = word,
insertText = last,
}
local item = items[modname]
-- item.label = "test + " .. item.label
Expand Down

0 comments on commit d580089

Please sign in to comment.