Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested commands #662

Open
ridulfo opened this issue Jul 24, 2024 · 2 comments · May be fixed by #668
Open

Nested commands #662

ridulfo opened this issue Jul 24, 2024 · 2 comments · May be fixed by #668
Labels

Comments

@ridulfo
Copy link
Contributor

ridulfo commented Jul 24, 2024

🚀 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 😅

@epwalsh
Copy link
Owner

epwalsh commented Jul 26, 2024

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

@epwalsh epwalsh added the contributions welcome Extra attention is needed label Jul 26, 2024
@epwalsh epwalsh linked a pull request Jul 29, 2024 that will close this issue
@epwalsh
Copy link
Owner

epwalsh commented Jul 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants