nvim: Ensure FeMaCo newline in codefence injections

When formatting femaco buffers it would sometimes remove the newline
necessary at the end of code fences to have the (```) remain on its own
line. This attempts to fix it.
This commit is contained in:
Marty Oehme 2025-02-01 10:45:52 +01:00
parent ddaaa69795
commit a5d28351cd
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -227,8 +227,15 @@ return {
cmd = { cmd = {
"FeMaco", "FeMaco",
}, },
ft = { "markdown", "quarto" }, ft = { "markdown", "rmd", "quarto" },
opts = {}, opts = {
ensure_newline = function(base_ft)
if base_ft == "quarto" or base_ft == "markdown" then
return true
end
return false
end,
},
dependencies = { dependencies = {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },