parent
174873b41f
commit
854534f54c
2 changed files with 29 additions and 8 deletions
|
@ -6,23 +6,44 @@ end
|
|||
|
||||
vim.opt.completeopt = "menuone,noselect"
|
||||
|
||||
local function border(hl_name)
|
||||
return {
|
||||
{ "╭", hl_name },
|
||||
{ "─", hl_name },
|
||||
{ "╮", hl_name },
|
||||
{ "│", hl_name },
|
||||
{ "╯", hl_name },
|
||||
{ "─", hl_name },
|
||||
{ "╰", hl_name },
|
||||
{ "│", hl_name },
|
||||
}
|
||||
end
|
||||
|
||||
local cmp_window = require "cmp.utils.window"
|
||||
|
||||
function cmp_window:has_scrollbar()
|
||||
return false
|
||||
end
|
||||
|
||||
local options = {
|
||||
window = {
|
||||
completion = {
|
||||
border = border "CmpBorder",
|
||||
},
|
||||
documentation = {
|
||||
border = border "CmpDocBorder",
|
||||
},
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
format = function(_, vim_item)
|
||||
local icons = require "plugins.configs.lspkind_icons"
|
||||
vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
|
||||
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
buffer = "[BUF]",
|
||||
})[entry.source.name]
|
||||
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "ﰠ",
|
||||
Variable = "",
|
||||
|
|
Loading…
Reference in a new issue