obsidian.nvim
obsidian.nvim copied to clipboard
More keybindings
🚀 The feature, motivation and pitch
first of all big thanks for a great plugin ! here are some features I really miss:
- a variant of
ObsidianNewcommand that would requests user's input to get new note name. - a variant of
ObsidianLinkcommand that would open up a picker to select a file or a header to link. - a variant of
ObsidianRenamecommand that would request user input to get a new name of the current note.
Alternatives
public lua functions similar to require("obsidian").util.toggle_checkbox() are also fine.
Additional context
I'am not a big fan of typing commands in NeoVim so I bind every command that I would ever use to a key but currently it seems to be impossible to do that with the commands I listed above (correct me if I'am wrong)
Hey @aitvann, those features are on the roadmap, but it might be a while as I'm pretty busy right now. In the meantime you could use Telescope's API to open a picker, and then call the corresponding Obsidian.nvim command with the result.
Here's an example of using the Telescope API from our ObsidianLink command: https://github.com/epwalsh/obsidian.nvim/blob/afe4bce39d811f1c085d097edde6e33b33bae557/lua/obsidian/commands/link.lua#L78-L95
By the way you can run any Obsidian.nvim command programmatically like this:
:lua require("obsidian").get_client():command("ObsidianNew", { args = "Foo" })
thank you. feel free to close the issue
By the way you can run any Obsidian.nvim command programmatically like this:
:lua require("obsidian").get_client():command("ObsidianNew", { args = "Foo" })
hi, may I ask how to run command "ObsidianTags" using in this form? When I run :lua require("obsidian").get_client():command("ObsidianTags", { args = "Foo" }) to filter notes with Foo tag, it just prompted that Error executing lua vim/shared.lua:0: Expected table, got nil.