Create user command on plugin load.
This commit is contained in:
parent
c1744a5e81
commit
3c7f0e66db
13
plugin/init.lua
Normal file
13
plugin/init.lua
Normal file
@ -0,0 +1,13 @@
|
||||
if vim.fn.exists("g:loaded_md-tools") == 0 then
|
||||
local user_cmd = vim.api.nvim_create_user_command
|
||||
|
||||
user_cmd("HeaderPromote", function (opts)
|
||||
require("md-tools").promote()
|
||||
end, {})
|
||||
|
||||
user_cmd("HeaderDemote", function (opts)
|
||||
require("md-tools").demote()
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_set_var("loaded_md-tools", true)
|
||||
end
|
Loading…
Reference in New Issue
Block a user