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:
parent
ddaaa69795
commit
a5d28351cd
1 changed files with 9 additions and 2 deletions
|
|
@ -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",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue