nvim: Add cmp completion for render-markdown items

This commit is contained in:
Marty Oehme 2025-01-30 22:30:24 +01:00
parent 49c9dfcc9b
commit 2618eb55b8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -260,9 +260,28 @@ local latex_cmp = {
end, end,
} }
local markdown_cmp = {}
-- FIXME: Currently always set to true but should ideally
-- recognize if we have render-markdown available or not
if is_available("render-markdown") or true then
markdown_cmp = {
"nvim-cmp",
dependencies = {
{ "MeanderingProgrammer/render-markdown.nvim", main = "render-markdown", optional = true },
},
ft = "markdown",
opts = function(_, opts)
table.insert(opts.sources, {
name = "render-markdown",
})
end,
}
end
return { return {
completion_engine, completion_engine,
snippet_engine, snippet_engine,
beancount_cmp, beancount_cmp,
latex_cmp, latex_cmp,
markdown_cmp,
} }