obsidian.nvim icon indicating copy to clipboard operation
obsidian.nvim copied to clipboard

Nested commands

Open ridulfo opened this issue 1 year ago • 2 comments

🚀 The feature, motivation and pitch

Hi! First off, thanks for this plugin! I use it literally every day.

In telescope.nvim the commands are nested under :Telescope. This allows for an easier time finding and writing a command. In obsidian.nvim, when I type :O and then hit tab it suggests:

  • ObsidianBacklinks
  • ObsidianCheck
  • etc.

It would make it easier to use the command line if you could work in the following way:

  1. :O and hit tab, autocompleting it to :Obsidian .
  2. :Obsidian ba and hit tab, autocompleting to :Obsidian backlinks

As mentioned, this is the way telescope.nvim works by providing a complete function to nvim_create_user_command. Like so code.

This does not have to be a breaking change. We could introduce a new command just called :Obsidian with the above mentioned properties.

Additional context

Obsidian.nvim today:

image

Telescope.nvim: image

Would be happy to create a PR for this if it sounds interesting. 🚀

PS sorry for light-mode theme, it is sunny outside 😅

ridulfo avatar Jul 24 '24 12:07 ridulfo

Hey @ridulfo I like that idea a lot! Happy to accept a PR

epwalsh avatar Jul 26 '24 20:07 epwalsh

@ridulfo I was bored today so I took a stab at this: #668.

epwalsh avatar Jul 29 '24 01:07 epwalsh