53 lines
1.1 KiB
Lua
53 lines
1.1 KiB
Lua
-- 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'
|
|
},
|
|
lazy = true,
|
|
config = function ()
|
|
require('mkdnflow').setup({
|
|
filetypes = {
|
|
md = true,
|
|
rmd = true,
|
|
markdown = true,
|
|
pandoc = true
|
|
},
|
|
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
|
|
}
|
|
}
|