2023-06-01 21:21:10 +02:00
|
|
|
-- 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",
|
2023-06-07 11:30:31 +02:00
|
|
|
ft = {
|
|
|
|
'pandoc',
|
|
|
|
'markdown'
|
|
|
|
},
|
2023-06-01 21:21:10 +02:00
|
|
|
lazy = true,
|
|
|
|
config = function ()
|
|
|
|
require('mkdnflow').setup({
|
2023-06-08 16:51:37 +02:00
|
|
|
filetypes = {
|
|
|
|
md = true,
|
|
|
|
rmd = true,
|
|
|
|
markdown = true,
|
|
|
|
pandoc = true
|
|
|
|
},
|
2023-06-30 14:31:01 +02:00
|
|
|
perspective = {
|
|
|
|
-- Ensure that paths are relative to the current file
|
|
|
|
priority = "current"
|
|
|
|
},
|
2023-06-08 07:12:48 +02:00
|
|
|
links = {
|
|
|
|
conceal = true,
|
2023-06-08 16:51:37 +02:00
|
|
|
},
|
|
|
|
new_file_template = {
|
|
|
|
use_template = true,
|
|
|
|
template = [[
|
2023-06-30 14:31:01 +02:00
|
|
|
---
|
|
|
|
title:
|
|
|
|
date: {{ date }}
|
|
|
|
id: {{ id }}
|
|
|
|
tags: []
|
|
|
|
---
|
2023-06-08 16:51:37 +02:00
|
|
|
]],
|
|
|
|
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
|
|
|
|
},
|
|
|
|
}
|
2023-06-08 07:12:48 +02:00
|
|
|
}
|
2023-06-08 16:51:37 +02:00
|
|
|
})
|
2023-06-01 21:21:10 +02:00
|
|
|
end
|
|
|
|
}
|
|
|
|
}
|