Give the dashboard more to say, and let both reports fold - #2132
Merged
Conversation
The dashboard reported what Projectile knows about a project but not much about the project itself. It now links the files a person actually opens first - README, changelog, license, the type's own manifest, the .projectile - all found in the single directory listing it already had to do. Alongside them: how many project buffers are open, and how many ignore patterns are in effect. The uncached case used to be a dead end that said 'not indexed yet' and left you to it; it now offers to index in the background, which is the Flycheck trick of putting the fix next to the diagnosis. Both buffers also set outline-minor-mode over their sections. Section titles are capitalized and every field label is lowercase, so that one distinction is the entire heading regexp - folding for free, with no dependency on magit-section. Their footers now look up the keys they advertise instead of hardcoding them, so a rebind can't make them lie.
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.
Follow-up to #2131, with a few ideas borrowed from packages that solve the same
problem.
The dashboard reported plenty about how Projectile sees a project and almost
nothing about the project itself. It now has a "Notable files" section linking
the things you actually open first - README, changelog, license, the project
type's own manifest, the
.projectile- all resolved from the single directorylisting it was already doing, so the section is free. Alongside them: how many
of the project's buffers are open, and how many ignore patterns are in effect.
not indexed yetused to be a dead end. It now comes with an[index now]button that warms the cache in the background - Flycheck's
verify-setuptrickof putting the fix next to the diagnosis, which is worth stealing wholesale.
Both buffers now set up
outline-minor-modeover their sections. The headingregexp is just
[A-Z]: section titles are capitalized and every field label islowercase, so that distinction was already there for free. That gets folding
without depending on
magit-section, which would drag in compat 31, cond-letand llama for a package whose only dependency today is compat.
Their footers also derive the keys they advertise with
substitute-command-keys(another Flycheck habit) rather than hardcoding
w, so a rebind can't make thehint lie. There's a spec that rebinds the copy key and checks the footer follows.