You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2148: Add projectile-switch-sibling-project (s-p n), which offers only the projects related to the one you're in, rather than every project on the machine.
Relatedness comes from projectile-project-groups if you've configured it, then from the owner of the upstream remote, then from the leading word of the directory name - see projectile-sibling-project-functions.
The remote's owner is what relates projects whose names have nothing in common; an inferred group covering more than projectile-sibling-max-group-share of your projects is dropped, since "we're all under the same account" relates nothing.
#2151: projectile-switch-worktree also offers Jujutsu workspaces, and a jj repository is now identified through its git backing store, so a workspace and the colocated git checkout agree on being the same thing and jj projects get siblings like any other.
#2147: Add projectile-switch-worktree (s-p W), which offers the other checkouts of the current project's repository, each annotated with whatever tells it apart - the branch for git and Mercurial, the workspace name for Jujutsu.
Git worktrees and separate clones of the same upstream both count as checkouts, since they're the same workflow with and without the plumbing; projectile-worktree-functions is where other ways of finding them plug in.
projectile-run-test-at-point learns erlang-ts-mode (EUnit's _test/_test_ functions, run as rebar3 eunit --test=module:name) and fsharp-ts-mode (bindings attributed [<Fact>], [<Theory>], [<Test>], [<TestCase>] or [<Property>], run through dotnet test --filter).
The ocaml-dune and rebar project types gained their run, install, package and source/test directory attributes, and a new erlang-mk type covers the other common Erlang build tool.
OCaml deliberately gets no test-at-point rule: its tests are ordinary values registered with Alcotest or OUnit rather than anything the syntax marks out, so there is nothing to recognize.
#2137: Ship :file-kinds tables for Phoenix, Laravel and Next.js, so projectile-find-file-of-kind (s-p j) and projectile-toggle-related-file (s-p J) work in those out of the box - Rails and Django were the only frameworks covered before.
Phoenix keys a resource's modules on the name they share (user_controller.ex, user_html.ex, user_live.ex), Laravel on the model's class name, Next.js on the app router's directory.
Adds a nextjs project type (next.config.js and friends) to hang the last of those on.
#2136: projectile-run-test-at-point now knows Ruby (RSpec and Minitest), Rust, Elixir and Java, on top of the Python, Go and JS/TS rules it shipped with.
Ruby is written the same way whichever framework you use, so the project type picks the runner; Java's picks between Maven and Gradle, and takes the class name from the file.
ExUnit can't select a test by name from the command line, so Elixir tests are addressed as FILE:LINE.
#2135: Add projectile-ignored-project-patterns, the regexp-matching sibling of projectile-ignored-projects (exact paths) and projectile-ignored-project-function (a predicate), so keeping whole areas of a machine out of the known projects doesn't need a lambda.
#2134: Add projectile-find-changed-file (s-p C), which completes over the files git reports as staged, unstaged or untracked - or, with a prefix argument, over everything that differs from a revision you pick.
#2133: projectile-doctor findings you can act on now carry a button that does it - [enable] for a disabled projectile-mode, [enable caching] on a large uncached project, [open dirconfig] for a .projectile with prefix-less lines, [edit .dir-locals.el] for an undetected project type. Pressing one regenerates the report, so the finding answers for itself; findings Projectile can't act on stay plain advice.
#2132: The dashboard gained a "Notable files" section linking the project's README, changelog, license, its type's own manifest and its .projectile (see projectile-dashboard-link-files), plus a count of its open buffers and a summary of the ignore rules in effect.
A project with nothing cached now offers an [index now] button instead of only reporting that it isn't indexed.
Both report buffers set up outline-minor-mode over their sections, so a long report folds with the usual outline keys, and their footers derive the keys they advertise with substitute-command-keys rather than hardcoding them.
#2131: The projectile-doctor and projectile-dashboard buffers are no longer plain text: section headers, field labels, the project's identity and the doctor's findings are faced by meaning, with the findings colored by severity and sorted so anything wanting action comes first.
All the new faces only inherit from standard ones, so themes style them without knowing about Projectile and a terminal without colors degrades to what you got before.
projectile-report-copy (w in either buffer) copies the buffer as plain text, without the faces and buttons - a doctor report usually ends up in an issue.
#2130: projectile-run-task now also discovers rake tasks, read out of the project's Rakefile and its .rake files (in rakelib, tasks and lib/tasks) rather than by running rake -T, which would load the whole application. Tasks are qualified with their namespace (rake:db:migrate) and run through bundle exec when the project has a Gemfile.
Changes
#2152: The per-command-type histories now belong to the repository rather than the directory, so pressing M-p at a compile or test prompt in a fresh git worktree - or in a second clone of the same upstream - offers the commands the project is actually built with instead of nothing (#1786).
What a prompt is pre-filled with, and what projectile-repeat-last-command replays, stay local to the checkout you're in: both act without asking, and a remembered command can carry absolute paths back into the checkout it was typed in.
Existing histories are adopted rather than dropped, and projectile-command-history-scope set to project restores a history per directory.
#2146: The six projectile-<cmd>-use-comint-mode options fold into one projectile-use-comint-mode, taking t or a list of the phases to make interactive.
#2146: projectile-per-project-compilation-buffer and projectile-per-command-compilation-buffer fold into projectile-compilation-buffer-scope, a list of project and/or command - which is what setting both booleans already meant.
#2146: Rename the options that broke their own naming schemes: projectile-global-ignore-file-patterns to projectile-globally-ignored-file-regexps, projectile-cmd-hist-ignoredups to projectile-command-history-ignore-duplicates, projectile-related-files-fn-function to projectile-related-files-function, projectile-auto-discover to projectile-auto-discover-projects, and the three reviewable-search options named after replace (projectile-replace-max-matches, -async and -scan-chunk-size) to the projectile-search- prefix their siblings already used.
#2146: projectile-tags-file-name and projectile-go-project-test-function are obsolete; both were only ever read as Projectile loaded, so setting them from your init file afterwards did nothing. List the tags file in projectile-globally-ignored-files, and re-register the go project type to change how it's detected.
#2146: Every renamed or folded option is still honored under its old name, so existing configuration keeps working.
#2146: Make the options' Customize metadata uniform - seven options that document nil as meaningful had a :type that rejected it, so Customize refused to edit them, and the :safe predicates now cover all the ignore lists rather than four of the nine.
Bugs fixed
#2145: The known projects file, the frecency store and the session directory are resolved with locate-user-emacs-file rather than expanded against user-emacs-directory by hand, so they land beside the rest of your Emacs state when your configuration lives in ~/.config/emacs instead of ~/.emacs.d. Nothing moves for a configuration in the usual place.
#2144: Internal: the two shapes a project type marker can take are decoded in one place now, rather than by each of the four consumers separately.
#2142: Project types can declare :src-extension and :test-extension, for the languages whose tests don't carry the same extension as their sources. The bundled elixir type sets them, so toggling from lib/foo.ex now offers to create test/foo_test.exs - a script ExUnit will actually run - rather than test/foo_test.ex.
#2141: The messages Projectile emits without being asked are now prefixed with [Projectile], so it's clear where they came from; the ones that answer a command you just invoked stay unprefixed. Five different conventions across the file (a Projectile: prefix, a bare Projectile one, the project name in brackets, plain passthrough, and no prefix at all) become one rule.
The indexing notice follows the manual's Operating.../Operating...done idiom, so a long index no longer leaves the echo area claiming to still be working.
projectile-project-info reads Project: /path/ (npm, git) rather than separating its three fields with ##.
#2140: projectile-verbose now covers five more messages Projectile emitted without being asked: caching a file the find-file hook picked up, a search path entry that doesn't exist, an indexing command that exited non-zero but produced usable output (both the sync and async runners), and a session file from an older format version. Commands you invoke still report what they did whatever the option is set to, and the two that are also commands (projectile-cache-current-file, projectile-discover-projects-in-directory) still speak when invoked directly.
#2139: The file-notification cache updates now honor the VCS's ignore rules too, so a watched project no longer gains files a re-index would never have listed - the last place .gitignore was going unread, after #2126 fixed it for files opened by hand. One git check-ignore covers a whole batch of events, since a batch can be an entire directory moved into the project.
#2146: The default projectile-globally-ignored-buffers entries are matched as regexps, so *scratch* only matched by accident and *scratchhh* matched too; the asterisks are now escaped.
#2146: projectile-svn-command filtered directories out of svn list -R with grep -v '$/', where the $ is a literal rather than an anchor, so it never dropped anything and svn projects listed their directories among their files.