Skip to content

Point the Neovim projects picker at ~/Projects - #246

Open
Vegasq wants to merge 1 commit into
omacom:masterfrom
Vegasq:nvim-projects-picker-dev-dirs
Open

Point the Neovim projects picker at ~/Projects#246
Vegasq wants to merge 1 commit into
omacom:masterfrom
Vegasq:nvim-projects-picker-dev-dirs

Conversation

@Vegasq

@Vegasq Vegasq commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #245.

The snacks projects picker defaults dev to { "~/dev", "~/projects" } — lowercase. Omarchy provisions ~/Projects, so on a case-sensitive filesystem the picker scans two directories that don't exist. Its only other source is git roots of recently opened files, empty on a fresh install, so the dashboard's Projects button opens an empty picker until the user configures it themselves.

This adds lua/plugins/snacks-projects.lua pointing dev at ~/Projects, matching what omarchy-provision-user and omarchy-upgrade-to-quattro actually create and bookmark.

On keeping the old defaults

~/dev and ~/projects are kept, but only when they exist. Unconditionally listing all three would regress nobody, but fd prints [fd error]: Search path '/home/<user>/dev' is not a directory. for each missing path — on every picker invocation, for essentially every user. Filtering to existing directories keeps anyone already working out of ~/dev unaffected without producing that noise. The list is never empty, since ~/Projects is unconditional (fd with no search path would otherwise scan the cwd).

Verification

Built the plugin file into a live config and read back the merged picker options:

$ nvim --headless -c 'lua print(vim.inspect(require("snacks.picker.config").get({source="projects"}).dev))' -c 'qa!'
{ "~/Projects" }

on a machine with no ~/dev or ~/projects. The picker then lists the repositories under ~/Projects; before the change it listed nothing.

pkgver bumped to the current date per the convention in this package's history (config-only changes bump pkgver, pkgrel stays 1).

Scope

Deliberately limited to the dev list. The default patterns are left alone, though it's worth noting a project folder without a .git/Makefile/package.json still won't appear — adding pyproject.toml, Cargo.toml and go.mod would widen that, but that's a separate judgment call and not needed to fix the reported bug.

snacks defaults its projects picker `dev` list to { "~/dev", "~/projects" },
lowercase. Omarchy provisions ~/Projects instead -- omarchy-provision-user and
omarchy-upgrade-to-quattro both create it and add it to the file manager
bookmarks -- so on a case-sensitive filesystem the picker scans two directories
that do not exist. Its only other source is the git roots of recently opened
files, which is empty on a fresh install, so the dashboard's Projects button
opens an empty picker until the user configures it themselves.

Keep the two legacy directories when they exist, so anyone already working out
of ~/dev is unaffected, but only when they exist: fd prints "Search path ... is
not a directory" for each missing search path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X1oy5v4BEVbnMu85dj8Vs6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Neovim Projects picker is empty: snacks scans ~/dev and ~/projects, Omarchy creates ~/Projects

1 participant