Example configuration:
(use-package projectile
:diminish projectile-mode
:config (projectile-mode)
:custom ((projectile-completion-system 'ivy))
:bind-keymap
("C-c p" . projectile-command-map)
:init
(setq projectile-switch-project-action #'projectile-dired))
- See use-package.
- diminish hides or abbreviates the mode-line for that mode.
- The
init
block runs before the package is loaded. In this example it just setsprojectile-switch-project-action
– which tells projectile what to do when switching to a project – to list the project files. config
is ruby after the package is loaded.
A git backed folder will automatically be identified as a project, but you can
just add .projectile
file to any dir root to make it a project.
Most of the stuff you can do with this are discoverable with the keymap
binding above (Or SPC p
in spacemacs), but some noteworthy things are:
projectile-edit-dir-locals
projectile-find-file-in-known-projects