feat(plugins): add markdown edit visual-mode formatting bindings
This commit is contained in:
1 parent
f6c6b05332
commit
ad29f03972
1 file changed
+27
@@ -0,0 +1,27 @@
|
||||
--- `<Leader>e` visual-mode formatting binds for markdown/mdx buffers; the
|
||||
--- editing itself lives in config.markdown_edit.
|
||||
---
|
||||
--- Buffer-local so `<Leader>e` stays the git files picker everywhere else.
|
||||
--- @module plugins.markdown-edit
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
opts = {
|
||||
autocmds = {
|
||||
markdown_edit = {
|
||||
{
|
||||
event = "FileType",
|
||||
-- `markdown.*` catches the `markdown.mdx` buffers the mdx pack sets
|
||||
-- up; a plain `markdown` pattern does not match a dotted filetype
|
||||
pattern = { "markdown", "markdown.*" },
|
||||
desc = "Markdown formatting binds for the visual selection",
|
||||
callback = function(args)
|
||||
require("astrocore").set_mappings(require("config.markdown_edit").mappings, { buffer = args.buf })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user