cmp: Add border to floating docs, move completeopt inside config
format files
This commit is contained in:
parent
5a3ac7300d
commit
46db63749f
@ -84,8 +84,8 @@ M.misc = function()
|
||||
map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() <CR>") -- show keybinds
|
||||
map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() <CR>") -- close buffer
|
||||
map("n", maps.misc.copy_whole_file, ":%y+ <CR>") -- copy whole file content
|
||||
map("v", maps.misc.copy_to_system_clipboard, "\"+y")
|
||||
map("n", maps.misc.copy_to_system_clipboard, "\"+yy") -- copy curent line in normal mode
|
||||
map("v", maps.misc.copy_to_system_clipboard, '"+y')
|
||||
map("n", maps.misc.copy_to_system_clipboard, '"+yy') -- copy curent line in normal mode
|
||||
map("n", maps.misc.new_buffer, ":enew <CR>") -- new buffer
|
||||
map("n", maps.misc.new_tab, ":tabnew <CR>") -- new tabs
|
||||
map("n", maps.misc.line_number_toggle, ":set nu! <CR>") -- toggle numbers
|
||||
|
@ -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…
Reference in New Issue
Block a user