fix(nvim): show hidden files in Snacks file picker#50
Open
Conversation
Pass hidden = true so dotfiles like .github are searchable via <leader>ff while still respecting .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Neovim の Snacks ファイルピッカーでドットファイル(例: .github/)が <leader>ff の検索対象に入らない問題を解消し、隠しファイルを表示できるようにする変更です。
Changes:
<leader>ffのSnacks.picker.files()呼び出しにhidden = trueを追加してドットファイルを検索対象に含める
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| keys = { | ||
| -- ファイル検索 | ||
| { "<leader>ff", function() Snacks.picker.files() end, desc = "Find files" }, | ||
| { "<leader>ff", function() Snacks.picker.files({ hidden = true }) end, desc = "Find files" }, |
There was a problem hiding this comment.
<leader>ff だけ hidden = true を渡す形になったため、他の Snacks.picker.files() 呼び出し(例: dot_config/nvim/lua/plugins/dashboard.lua:29 の Dashboard の Find File)と挙動が不一致になります。ドットファイルを常に含めたい意図なら、共通のラッパー関数を作って両方から呼ぶか、Snacks の picker 側のデフォルト設定として files に hidden = true を設定して一箇所で管理するとメンテしやすいです。
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.
Summary
<leader>ffで.github/のようなドットファイルが検索できなかった問題を修正Snacks.picker.filesにhidden = trueを渡してドットファイルを検索対象に含めるignoredはデフォルト(false)のままなので.gitignoreは引き続き尊重されるTest plan
<leader>ffでドットファイル(.github/workflows/*.yml等)が候補に出ること.git/配下や.gitignore対象のファイルが候補に出ないこと🤖 Generated with Claude Code