cmp: Add border to floating docs, move completeopt inside config

format files
This commit is contained in:
Akianonymus 2022-02-01 16:39:51 +05:30 committed by siduck
parent 5a3ac7300d
commit 46db63749f
2 changed files with 11 additions and 6 deletions

View file

@ -84,8 +84,8 @@ M.misc = function()
map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() <CR>") -- show keybinds 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.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("n", maps.misc.copy_whole_file, ":%y+ <CR>") -- copy whole file content
map("v", maps.misc.copy_to_system_clipboard, "\"+y") 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.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_buffer, ":enew <CR>") -- new buffer
map("n", maps.misc.new_tab, ":tabnew <CR>") -- new tabs map("n", maps.misc.new_tab, ":tabnew <CR>") -- new tabs
map("n", maps.misc.line_number_toggle, ":set nu! <CR>") -- toggle numbers map("n", maps.misc.line_number_toggle, ":set nu! <CR>") -- toggle numbers

View file

@ -6,15 +6,19 @@ end
local snippets_status = require("core.utils").load_config().plugins.status.snippets local snippets_status = require("core.utils").load_config().plugins.status.snippets
vim.opt.completeopt = "menuone,noselect"
local default = { local default = {
completion = {
completeopt = "menuone,noselect",
},
documentation = {
border = "single",
},
snippet = (snippets_status and { snippet = (snippets_status and {
expand = function(args) expand = function(args)
require("luasnip").lsp_expand(args.body) require("luasnip").lsp_expand(args.body)
end, end,
}) or { }) or {
expand = function(args) end, expand = function(_) end,
}, },
formatting = { formatting = {
format = function(entry, vim_item) 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.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
vim_item.menu = ({ vim_item.menu = ({
buffer = "[BUF]",
nvim_lsp = "[LSP]", nvim_lsp = "[LSP]",
nvim_lua = "[Lua]", nvim_lua = "[Lua]",
buffer = "[BUF]", path = "[Path]",
})[entry.source.name] })[entry.source.name]
return vim_item return vim_item