64 lines
1.3 KiB
Lua
64 lines
1.3 KiB
Lua
-- Install and Configure Mkdownflow plugin.
|
|
-- Allows to follow links, anchors, create links, and many more.
|
|
-- https://github.com/jakewvincent/mkdnflow.nvim
|
|
|
|
-- Keymaps for mkdnflow.
|
|
-- Table
|
|
vim.keymap.set(
|
|
{'n','x','v'},
|
|
'<leader>tf',
|
|
'<cmd>MkdnTableFormat<CR>',
|
|
{desc = 'Format table under cursor'}
|
|
)
|
|
|
|
return {
|
|
{
|
|
"jakewvincent/mkdnflow.nvim",
|
|
ft = {
|
|
'pandoc',
|
|
'markdown',
|
|
'quarto'
|
|
},
|
|
lazy = true,
|
|
config = function ()
|
|
require('mkdnflow').setup({
|
|
filetypes = {
|
|
md = true,
|
|
rmd = true,
|
|
qmd = true,
|
|
markdown = true,
|
|
pandoc = true
|
|
},
|
|
perspective = {
|
|
-- Ensure that paths are relative to the current file
|
|
priority = "current"
|
|
},
|
|
links = {
|
|
conceal = true,
|
|
},
|
|
new_file_template = {
|
|
use_template = true,
|
|
template = [[
|
|
---
|
|
title:
|
|
date: {{ date }}
|
|
id: {{ id }}
|
|
tags: []
|
|
---
|
|
]],
|
|
placeholders = {
|
|
before = {
|
|
date = function ()
|
|
return os.date("%Y-%m-%dT%H:%M:%S%z")
|
|
end,
|
|
id = function ()
|
|
return os.date("%Y%m%d%H%M%S")
|
|
end
|
|
},
|
|
}
|
|
}
|
|
})
|
|
end
|
|
}
|
|
}
|