cmp: Add border to floating docs, move completeopt inside config
format files
This commit is contained in:
parent
5a3ac7300d
commit
46db63749f
2 changed files with 11 additions and 6 deletions
lua/plugins/configs
|
@ -6,15 +6,19 @@ end
|
|||
|
||||
local snippets_status = require("core.utils").load_config().plugins.status.snippets
|
||||
|
||||
vim.opt.completeopt = "menuone,noselect"
|
||||
|
||||
local default = {
|
||||
completion = {
|
||||
completeopt = "menuone,noselect",
|
||||
},
|
||||
documentation = {
|
||||
border = "single",
|
||||
},
|
||||
snippet = (snippets_status and {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
}) or {
|
||||
expand = function(args) end,
|
||||
expand = function(_) end,
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
|
@ -22,9 +26,10 @@ local default = {
|
|||
vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
|
||||
|
||||
vim_item.menu = ({
|
||||
buffer = "[BUF]",
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
buffer = "[BUF]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
|
||||
return vim_item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue