Point the Neovim projects picker at ~/Projects - #246
Open
Vegasq wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #245.
The snacks projects picker defaults
devto{ "~/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.luapointingdevat~/Projects, matching whatomarchy-provision-userandomarchy-upgrade-to-quattroactually create and bookmark.On keeping the old defaults
~/devand~/projectsare kept, but only when they exist. Unconditionally listing all three would regress nobody, butfdprints[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~/devunaffected without producing that noise. The list is never empty, since~/Projectsis unconditional (fdwith no search path would otherwise scan the cwd).Verification
Built the plugin file into a live config and read back the merged picker options:
on a machine with no
~/devor~/projects. The picker then lists the repositories under~/Projects; before the change it listed nothing.pkgverbumped to the current date per the convention in this package's history (config-only changes bumppkgver,pkgrelstays 1).Scope
Deliberately limited to the
devlist. The defaultpatternsare left alone, though it's worth noting a project folder without a.git/Makefile/package.jsonstill won't appear — addingpyproject.toml,Cargo.tomlandgo.modwould widen that, but that's a separate judgment call and not needed to fix the reported bug.