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

Search/Tags to respect current workspace #689

Open
psiho opened this issue Aug 20, 2024 · 0 comments
Open

Search/Tags to respect current workspace #689

psiho opened this issue Aug 20, 2024 · 0 comments

Comments

@psiho
Copy link

psiho commented Aug 20, 2024

🚀 The feature, motivation and pitch

If I have multiple workspaces, I was expecting that :ObsidianSearch and :ObsidianTags use only files from currently selected workspace. However, it currently searches the main workspace (or all, not sure).
I have a main vault for my general notes, but for every project I work on, I create _wiki folder in the root of it. I'm using dynamic workspaces which finds project_wiki_root and puts it in the path (with curr_dir fallback):

        {
            name = "project-vault",
            path = function()
                local project_wiki_path = GetProjectWikiPath()
                if project_wiki_path then
                    return project_wiki_path
                else
                    return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0)))
                end
            end,
            overrides = {
                notes_subdir = vim.NIL, -- have to use 'vim.NIL' instead of 'nil'
                new_notes_location = "current_dir",
                templates = {
                    folder = vim.NIL,
                },
                disable_frontmatter = true,
            },
        },

That works ok, but I fail to see any advantages of multiple (and/or dynamic) workspaces without some more functionality.

Alternatives

Only alternative I can think of is to write custom Telescope search which will search only inside project_wiki_root directory.

Additional context

I'm just trying obsidian.nvim for the first time, so I might be terribly wrong how all this works.

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