2023-12-27 22:16:07 +01:00
|
|
|
if vim.fn.exists("g:loaded_md-tools") == 0 then
|
2023-12-28 14:22:10 +01:00
|
|
|
local user_cmd = vim.api.nvim_create_user_command
|
2023-12-27 22:16:07 +01:00
|
|
|
|
2023-12-28 14:22:10 +01:00
|
|
|
user_cmd("HeaderPromote", function(opts)
|
|
|
|
require("md-tools").headerControl("promote")
|
|
|
|
end, {})
|
2023-12-27 22:16:07 +01:00
|
|
|
|
2023-12-28 14:22:10 +01:00
|
|
|
user_cmd("HeaderDemote", function(opts)
|
|
|
|
require("md-tools").headerControl("demote")
|
|
|
|
end, {})
|
2023-12-27 22:16:07 +01:00
|
|
|
|
2023-12-28 14:22:10 +01:00
|
|
|
user_cmd("ToDoToggle", function(opts)
|
|
|
|
require("md-tools").toggleTodo()
|
|
|
|
end, {})
|
|
|
|
|
|
|
|
vim.api.nvim_set_var("loaded_md-tools", true)
|
2023-12-27 22:16:07 +01:00
|
|
|
end
|