canola-git: git-aware hidden file filtering #3
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/canola-collection#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
canola.nvim's default hidden file filter only matches dotfile patterns (
^%.). Users who work in git repos want smarter filtering: show tracked dotfiles, hide ignored non-dotfiles. This was previously done inline in user configs viais_hidden_file+git ls-files/git ls-tree, but that approach doesn't scale and requires runtime setter calls.Solution
Add a
canola-gitextension to canola-collection that provides git-aware hidden file filtering. OnCanolaEnter/refresh, it runsgit ls-files --ignored --exclude-standard --others --directoryandgit ls-tree HEAD --name-onlyfor the current directory, caches the results per-directory, and overridesconfig._is_hidden_filewith a function that:The cache is invalidated on refresh. Configuration via
vim.g.canola_git.