feat: add border to autocomplete
This commit is contained in:
parent
252c04430a
commit
cfac67c5b5
2 changed files with 22 additions and 15 deletions
|
@ -66,6 +66,10 @@ local default_cmp_opts = {
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
window = {
|
window = {
|
||||||
|
completion = {
|
||||||
|
border = user_config.border,
|
||||||
|
winhighlight = 'FloatBorder:FloatBorder,Normal:Normal',
|
||||||
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
border = user_config.border,
|
border = user_config.border,
|
||||||
winhighlight = 'FloatBorder:FloatBorder,Normal:Normal',
|
winhighlight = 'FloatBorder:FloatBorder,Normal:Normal',
|
||||||
|
@ -99,13 +103,6 @@ local default_cmp_opts = {
|
||||||
|
|
||||||
cmp.setup(u.merge(default_cmp_opts, user_config.nvim_cmp or {}))
|
cmp.setup(u.merge(default_cmp_opts, user_config.nvim_cmp or {}))
|
||||||
|
|
||||||
cmp.setup.cmdline('/', {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Set configuration for specific filetype.
|
-- Set configuration for specific filetype.
|
||||||
cmp.setup.filetype('gitcommit', {
|
cmp.setup.filetype('gitcommit', {
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
@ -119,11 +116,20 @@ cmp.setup.filetype('TelescopePrompt', {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- cmp.setup.cmdline(':', {
|
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||||
-- mapping = cmp.mapping.preset.cmdline(),
|
cmp.setup.cmdline({ '/', '?' }, {
|
||||||
-- sources = cmp.config.sources({
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
-- { name = 'path' },
|
sources = {
|
||||||
-- }, {
|
{ name = 'buffer' },
|
||||||
-- { name = 'cmdline' },
|
},
|
||||||
-- }),
|
})
|
||||||
-- })
|
|
||||||
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'path' },
|
||||||
|
}, {
|
||||||
|
{ name = 'cmdline' },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
|
@ -3,6 +3,7 @@ local u = require('cosmic.utils')
|
||||||
|
|
||||||
local defaults = {
|
local defaults = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
'astro',
|
||||||
'css',
|
'css',
|
||||||
'html',
|
'html',
|
||||||
'javascript',
|
'javascript',
|
||||||
|
|
Loading…
Add table
Reference in a new issue