37 lines
2.0 KiB
Markdown
37 lines
2.0 KiB
Markdown
# md-tools
|
|
|
|
Simple neovim plugin adding a few helping keybinding and ways of writting to help write markdown, with the help of the [marksman](https://github.com/artempyanykh/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
|
|
```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.
|
|
|
|
## 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.
|