dotfiles/nvim/.config/nvim/lua/plugins/completion.lua

69 lines
1.6 KiB
Lua

return {
-- full documentation here: https://cmp.saghen.dev/
"saghen/blink.cmp",
dependencies = {
"saghen/blink.compat",
"rafamadriz/friendly-snippets",
"hrsh7th/cmp-calc",
"f3fora/cmp-spell",
{
"aspeddro/cmp-pandoc.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
filetypes = { "pandoc", "markdown", "quarto", "rmd" },
},
},
},
event = { "InsertEnter" },
opts = {
keymap = { preset = "default" },
appearance = {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- Useful for when your theme doesn't support blink.cmp
-- Will be removed in a future release
use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
completion = {
documentation = { auto_show = true, auto_show_delay_ms = 500 },
-- ghost_text = { enabled = true },
},
signature = {
enabled = true,
},
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = {
"pandoc",
"calc",
"lsp",
"path",
"snippets",
"buffer",
"spell",
},
providers = {
calc = {
name = "calc",
module = "blink.compat.source",
},
spell = {
name = "spell",
module = "blink.compat.source",
},
pandoc = {
name = "cmp_pandoc",
module = "blink.compat.source",
},
},
},
},
opts_extend = { "sources.default" },
}