mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
Better completion overlay with nvim-cmp
This commit is contained in:
parent
252752d084
commit
7897a96f7e
1 changed files with 26 additions and 0 deletions
26
lua/plugins/nvim-cmp.lua
Normal file
26
lua/plugins/nvim-cmp.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
-- Set custom formatting to add padding
|
||||
opts.formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- vim_item.abbr = " " .. vim_item.abbr .. " " -- Add padding
|
||||
return vim_item
|
||||
end,
|
||||
}
|
||||
-- Set custom window options
|
||||
opts.window = {
|
||||
completion = require("cmp").config.window.bordered(),
|
||||
documentation = require("cmp").config.window.bordered(),
|
||||
}
|
||||
-- Set custom highlights to remove transparency
|
||||
vim.api.nvim_set_hl(0, "Pmenu", { bg = "#1e222a", fg = "#c5cdd9" })
|
||||
vim.api.nvim_set_hl(0, "PmenuSel", { bg = "#3e4452", fg = "#c5cdd9" })
|
||||
vim.api.nvim_set_hl(0, "CmpItemAbbr", { fg = "#c5cdd9" })
|
||||
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "#569cd6" })
|
||||
vim.api.nvim_set_hl(0, "CmpItemKind", { fg = "#56b6c2" })
|
||||
vim.api.nvim_set_hl(0, "CmpItemMenu", { fg = "#c5cdd9" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue