mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(nvim-cmp.lua): add custom border function to define border characters for completion and documentation windows
feat(nvim-cmp.lua): configure window settings for completion and documentation windows to improve visual appearance and readability
This commit is contained in:
@@ -5,10 +5,34 @@ local lspkind = require("lspkind")
|
|||||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
|
local function border(hl_name)
|
||||||
|
return {
|
||||||
|
{ "╭", hl_name },
|
||||||
|
{ "─", hl_name },
|
||||||
|
{ "╮", hl_name },
|
||||||
|
{ "│", hl_name },
|
||||||
|
{ "╯", hl_name },
|
||||||
|
{ "─", hl_name },
|
||||||
|
{ "╰", hl_name },
|
||||||
|
{ "│", hl_name },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menu,menuone,preview,noselect",
|
completeopt = "menu,menuone,preview,noselect",
|
||||||
},
|
},
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
side_padding = 1,
|
||||||
|
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None",
|
||||||
|
scrollbar = false,
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
border = border "CmpDocBorder",
|
||||||
|
winhighlight = "Normal:CmpDoc",
|
||||||
|
},
|
||||||
|
},
|
||||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
|
|||||||
Reference in New Issue
Block a user