Simple markdown tools for neovim.
Go to file
CronyAkatsuki adf9812f61 Add TodoToggle command and format code. 2023-12-28 14:22:10 +01:00
lua/md-tools Implement todo toggle. 2023-12-28 14:20:46 +01:00
plugin Add TodoToggle command and format code. 2023-12-28 14:22:10 +01:00
LICENSE Initial commit. 2023-12-27 17:37:56 +01:00
README.md Implement todo toggle. 2023-12-28 14:20:46 +01:00

README.md

md-tools

Simple neovim plugin adding a few helping keybinding and ways of writting to help write markdown, with the help of the marksman lsp.

Marksman allows you to follow files with go to definition and a lot of other things, this plugin is just supposed to be a simple addition to help with things marksman doesn't/can't do as an lsp.

Planned features

  • Helper's for writting list's
  • Open web links
  • Maybe table helper ( There are already a lot of great table plugins so I most likelly won't be implementing that, but link to another one )
  • Toggle todo items
  • Probably some telescope functions

Features

Promoting and demoting headers

This one's is really explanatory, just set a keybinding and you will be able to quckly promote or demote a header with a keybinding.

To set the keybinding's for only specific filetype we can use the native loading for specific filetypes inside nevim by placing the file in {neovim_conf}/after/ftplugin/markdown.lua. We can use augroups for this but it isn't recommended.

$HOME/.config/nvim/after/ftplugin/markdown.lua

vim.keymap.set("n", "md", "<cmd>HeaderDemote<cr>", { desc = "Demote markdown header" })

vim.keymap.set("n", "mp", "<cmd>HeaderPromote<cr>", { desc = "Promote markdown header" })

You can also just use something like lazy.nvim and load the plugin only on markdown and have this be set in config. But that will leave this binding on even in a non markdown file tho.

Toggle to do items

Very simple function that toggles existing todo item's. It doesn't go out of it's way to create new todo item's or anythin like that, but just toggles existing toggle items. It also doesn't go out of it's way to toggle the paren't todo ( it's just a simple jump people ).

example mapping

vim.keymap.set("n", "mt", "<cmd>ToDoToggle<cr>", { desc = "Toggle Existing Todo Item" })

Small feature set

I plan for this plugin to be very small and only have a small amount of feature's because there are already a lot of really good neovim plugins for writting markdown but some of them are really big and do a lot of stuff you might don't want them to do.

On the other side there is another spectrum of plugins that focus on one specific thing while writting markdown that I will as I write this plugin and search for functionality will link here for the reason why I haven't implemented such a feature inside this little plugin.