feat(home-manager): replace cmp neovim plugin by blink.cmp
This commit is contained in:
parent
aabac25ffd
commit
0005b934d5
3 changed files with 103 additions and 106 deletions
99
modules/home-manager/cli/neovim/files/plugins/blink-cmp.lua
Normal file
99
modules/home-manager/cli/neovim/files/plugins/blink-cmp.lua
Normal file
|
@ -0,0 +1,99 @@
|
|||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "cmdline",
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
},
|
||||
completion = {
|
||||
menu = {
|
||||
draw = {
|
||||
components = {
|
||||
label = {
|
||||
width = { fill = true, max = 60, },
|
||||
},
|
||||
},
|
||||
columns = { { "label", "label_description", gap = 1 }, { "kind_icon", "kind" } },
|
||||
},
|
||||
},
|
||||
documentation = { auto_show = true },
|
||||
list = {
|
||||
max_items = 30;
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = true,
|
||||
},
|
||||
cycle = {
|
||||
from_bottom = true,
|
||||
from_top = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
default = {
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"buffer",
|
||||
"emoji",
|
||||
"dictionary",
|
||||
},
|
||||
providers = {
|
||||
emoji = {
|
||||
module = "blink-emoji",
|
||||
name = "Emoji",
|
||||
score_offset = 15, -- Tune by preference
|
||||
opts = { insert = true }, -- Insert emoji (default) or complete its name
|
||||
should_show_items = function()
|
||||
return vim.tbl_contains({ "gitcommit", "markdown" }, vim.o.filetype)
|
||||
end,
|
||||
},
|
||||
dictionary = {
|
||||
module = "blink-cmp-dictionary",
|
||||
name = "Dict",
|
||||
min_keyword_length = 3,
|
||||
max_items = 10,
|
||||
opts = {
|
||||
dictionary_files = function()
|
||||
if vim.bo.filetype == "markdown" or vim.bo.filetype == "gitcommit" then
|
||||
return {}
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
cmdline = {
|
||||
enabled = false,
|
||||
},
|
||||
appearance = {
|
||||
nerd_font_variant = "normal",
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue