Skip to content

ObsidianTags without value should lazily yield results instead of trying to show all tags at once #822

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

Open
Y0RI0 opened this issue Feb 7, 2025 · 0 comments

Comments

@Y0RI0
Copy link

Y0RI0 commented Feb 7, 2025

Edit:

This issue actually made me reconsider why I even have that many tags in the first place. But I suppose the question still stands 😅

🚀 The feature, motivation and pitch

The current implementation of ObsidianTags when no query is provided yields an extremely slow (~9-11 seconds) to open picker window for me because my Vault contains around 1500 tags. I tried to add Plenary and Telescope to dependencies, but that doesn't seem to be the issue.

I think that the functionality of no query, rather than automatically searching for and showing a list of all tags at once should wait for input to begin before performing a full vault search of tags.

I want to find notes by tag, but getting an immediate picker list of 1500 tags takes way too long and I'd rather start typing what I'm looking for and then start seeing a smaller refined list of potential tag matches. The actual obsidian tag search function for notes works better than this and can nearly instantaneously yield all tags in the vault at once.

ObsidianSearch is not as slow as this (~ 1 or 2 s) to open. Only ObsidianTags takes this long.

The way that it works when searching for and selecting a tag (trigger completion after X characters) within edit mode is most similar to what I'm looking for, except being able to find notes the same way would be fantastic.

Alternatives

  • Potentially provide this as an option instead of a default behavior, since it maybe works well for others.
  • Maybe an option to store a local tag cache? Which is async updated in the background when ObsidianTags is called and thus there is not waiting time for the full tag search to display a picker dialog?

Additional context

  • I load this up with Lazy.nvim
  • my config is not much different from defaults other than Vault paths, Telescope selected as picker
  dependencies = {
    -- Required.
    'nvim-lua/plenary.nvim',
    'hrsh7th/nvim-cmp',
    'telescope.nvim',
  },

  picker = {
    name = 'telescope.nvim',
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant