diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/blink.lua b/users/price/dots/.config/nvim/lua/plugins/configs/blink.lua index a395a388..2f62e8b3 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/blink.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/blink.lua @@ -7,11 +7,10 @@ return { library = { { path = "luassert-types/library", words = { "assert" } }, { path = "busted-types/library", words = { "describe" } }, - { path = "luvit-meta/library", words = { "vim%.uv", "vim%.loop" } }, + { path = "${3rd}/luv/library", words = { "vim%.uv", "vim%.loop" } }, }, }, dependencies = { - { "Bilal2453/luvit-meta", lazy = true }, { "LuaCATS/luassert", lazy = true }, { "LuaCATS/busted", lazy = true }, }, @@ -36,9 +35,21 @@ return { }, "amarakon/nvim-cmp-lua-latex-symbols", "mikavilpas/blink-ripgrep.nvim", + "moyiz/blink-emoji.nvim", }, build = "nix run .#build-plugin", config = function() + ---@class CustomKindMapItem + ---@field icon string + ---@field hlgroup string + + ---@type table + local custom_kind_map = { + Dadbod = { icon = "󰆼", hlgroup = "Dadbod" }, + Emoji = { icon = "󰞅", hlgroup = "Emoji" }, + Ripgrep = { icon = "", hlgroup = "Ripgrep" }, + ["lua-latex-symbols"] = { icon = "󰿈", hlgroup = "LatexSymbol" }, + } ---@diagnostic disable-next-line: missing-fields require("blink.cmp").setup({ -- 'default' for mappings similar to built-in completion @@ -107,14 +118,21 @@ return { ---@diagnostic disable-next-line: missing-fields sources = { default = { + "lazydev", "lsp", "path", "snippets", "buffer", "ripgrep", + "emoji", "dadbod", }, providers = { + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + score_offset = 100, + }, ripgrep = { module = "blink-ripgrep", score_offset = -3, @@ -139,6 +157,10 @@ return { cache = true, }, }, + emoji = { + module = "blink-emoji", + name = "Emoji", + }, dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, }, }, @@ -164,8 +186,20 @@ return { components = { kind_icon = { text = function(ctx) + local cust_kind_item = custom_kind_map[ctx.source_name] + if cust_kind_item then + ctx.kind_icon = cust_kind_item.icon + end return ctx.icon_gap .. ctx.kind_icon .. ctx.icon_gap end, + highlight = function(ctx) + local cust_kind_item = custom_kind_map[ctx.source_name] + if cust_kind_item then + return "BlinkCmpKindCustom" .. cust_kind_item.hlgroup + end + return require("blink.cmp.completion.windows.render.tailwind").get_hl(ctx) + or ("BlinkCmpKind" .. ctx.kind) + end, }, }, }, diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/kanagawa.lua b/users/price/dots/.config/nvim/lua/plugins/configs/kanagawa.lua index 2c6bf412..ecddd72f 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/kanagawa.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/kanagawa.lua @@ -137,23 +137,23 @@ return { { "BlinkCmpKindInterface", { fg = colors.fujiWhite, bg = colors.waveRed, blend = 0 } }, { "BlinkCmpKindColor", { fg = colors.fujiWhite, bg = colors.waveAqua2, blend = 0 } }, { "BlinkCmpKindTypeParameter", { fg = colors.fujiWhite, bg = colors.waveAqua2, blend = 0 } }, + { "BlinkCmpKindCustomEmoji", { fg = colors.fujiWhite, bg = colors.boatYellow2, blend = 0 } }, + { "BlinkCmpKindCustomRipgrep", { fg = colors.fujiWhite, bg = colors.crystalBlue, blend = 0 } }, + { "BlinkCmpKindCustomDadbod", { fg = colors.fujiWhite, bg = colors.oniViolet, blend = 0 } }, + { "BlinkCmpKindCustomLatexSymbol", { fg = colors.fujiWhite, bg = colors.surimiOrange, blend = 0 } }, { "CmpCustomSelectionColor", { bg = colors.sumiInk5, blend = 0 } }, - { "CmpCustomSelectionDadbodCompletion", { fg = colors.fujiWhite, bg = colors.oniViolet, blend = 0 } }, { "CmpCustomSelectionGit", { fg = colors.fujiWhite, bg = colors.roninYellow, blend = 0 } }, { "CmpCustomSelectionBuffer", { fg = colors.fujiWhite, bg = colors.springBlue, blend = 0 } }, { "CmpCustomSelectionPath", { fg = colors.fujiWhite, bg = colors.autumnYellow, blend = 0 } }, { "CmpCustomSelectionCalculator", { fg = colors.fujiWhite, bg = colors.waveBlue2, blend = 0 } }, { "CmpCustomSelectionOrgmode", { fg = colors.fujiWhite, bg = colors.waveAqua1, blend = 0 } }, - { "CmpCustomSelectionEmoji", { fg = colors.fujiWhite, bg = colors.carpYellow, blend = 0 } }, { "CmpCustomSelectionZsh", { fg = colors.fujiWhite, bg = colors.springGreen, blend = 0 } }, { "CmpCustomSelectionCrates", { fg = colors.fujiWhite, bg = colors.roninYellow, blend = 0 } }, { "CmpCustomSelectionDocker", { fg = colors.fujiWhite, bg = colors.springBlue, blend = 0 } }, { "CmpCustomSelectionCmdHistory", { fg = colors.fujiWhite, bg = colors.waveBlue2, blend = 0 } }, - { "CmpCustomSelectionRipgrep", { fg = colors.fujiWhite, bg = colors.crystalBlue, blend = 0 } }, { "CmpCustomSelectionNpm", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } }, { "CmpCustomSelectionCommit", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } }, { "CmpCustomSelectionSnippet", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } }, - { "CmpCustomSelectionLuaLatexSymbol", { fg = colors.fujiWhite, bg = colors.surimiOrange, blend = 0 } }, -- Telescope { "TelescopeNormal", { bg = colors.sumiInk2 } },