| title | Extensions | ||
|---|---|---|---|
| tags |
|
This is for developers
Example plugin of integrating: obsidian-markmap.nvim
So that your command shows up in the command completion/menu.
βββ LICENSE
βββ lua
βΒ Β βββ obsidian
βΒ Β βββ commands
βΒ Β βββ map.lua # command name your want to add, should be minimal, requires the logic from map module
βΒ Β βββ map
βΒ Β βββ init.lua # actual logic
βββ plugin
βΒ Β βββ map.lua # register your command here
βββ README.mdreturn {
"obsidian-nvim/obsidian.nvim",
dependencies = {
"your/plugin", -- makes sure your plugin loads first
},
}your-plugin-dir/plugin/map.lua:
require("obsidian").register_command("map", { nargs = 0 })See commands/init.lua for usage.