From b77413ff8f59f380612074f0c9bd49093d8db695 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sun, 19 Jan 2025 13:52:52 +0100 Subject: Squashed 'mut/neovim/pack/plugins/start/blink.cmp/' content from commit 1cc3b1a git-subtree-dir: mut/neovim/pack/plugins/start/blink.cmp git-subtree-split: 1cc3b1a908fbcfd15451c4772759549724f38524 --- lua/blink/cmp/config/appearance.lua | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lua/blink/cmp/config/appearance.lua (limited to 'lua/blink/cmp/config/appearance.lua') diff --git a/lua/blink/cmp/config/appearance.lua b/lua/blink/cmp/config/appearance.lua new file mode 100644 index 0000000..08a97ba --- /dev/null +++ b/lua/blink/cmp/config/appearance.lua @@ -0,0 +1,58 @@ +--- @class (exact) blink.cmp.AppearanceConfig +--- @field highlight_ns number +--- @field use_nvim_cmp_as_default boolean Sets the fallback highlight groups to nvim-cmp's highlight groups. Useful for when your theme doesn't support blink.cmp, will be removed in a future release. +--- @field nerd_font_variant 'mono' | 'normal' Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'. Adjusts spacing to ensure icons are aligned +--- @field kind_icons table + +local validate = require('blink.cmp.config.utils').validate +local appearance = { + --- @type blink.cmp.AppearanceConfig + default = { + highlight_ns = vim.api.nvim_create_namespace('blink_cmp'), + use_nvim_cmp_as_default = false, + nerd_font_variant = 'mono', + kind_icons = { + Text = '󰉿', + Method = '󰊕', + Function = '󰊕', + Constructor = '󰒓', + + Field = '󰜢', + Variable = '󰆦', + Property = '󰖷', + + Class = '󱡠', + Interface = '󱡠', + Struct = '󱡠', + Module = '󰅩', + + Unit = '󰪚', + Value = '󰦨', + Enum = '󰦨', + EnumMember = '󰦨', + + Keyword = '󰻾', + Constant = '󰏿', + + Snippet = '󱄽', + Color = '󰏘', + File = '󰈔', + Reference = '󰬲', + Folder = '󰉋', + Event = '󱐋', + Operator = '󰪚', + TypeParameter = '󰬛', + }, + }, +} + +function appearance.validate(config) + validate('appearance', { + highlight_ns = { config.highlight_ns, 'number' }, + use_nvim_cmp_as_default = { config.use_nvim_cmp_as_default, 'boolean' }, + nerd_font_variant = { config.nerd_font_variant, 'string' }, + kind_icons = { config.kind_icons, 'table' }, + }, config) +end + +return appearance -- cgit v1.2.3