This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+spacemacs/spacemacs-project/packages.el

103 lines
4 KiB
EmacsLisp
Raw Normal View History

;;; packages.el --- Spacemacs Project Management Layer packages File
;;
2021-03-22 20:11:29 +00:00
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-project-packages
'(
projectile
))
(defun spacemacs-project/init-projectile ()
(use-package projectile
:commands (projectile-ack
projectile-ag
projectile-compile-project
projectile-dired
projectile-find-dir
projectile-find-file
projectile-find-tag
projectile-test-project
projectile-grep
projectile-invalidate-cache
projectile-kill-buffers
projectile-multi-occur
projectile-project-p
projectile-project-root
projectile-recentf
projectile-regenerate-tags
projectile-replace
projectile-replace-regexp
projectile-run-async-shell-command-in-root
projectile-run-shell-command-in-root
projectile-switch-project
projectile-switch-to-buffer
projectile-vc)
:init
(progn
;; note for Windows: GNU find or Cygwin find must be in path to enable
2019-05-08 18:57:39 +00:00
;; fast indexing. Also, because windows ships with a program called
;; c:\windows\system32\find.exe that is very much not findutils find
;; we ignore that specific executable
(when (and (spacemacs/system-is-mswindows) (executable-find "find")
(not (file-in-directory-p
(executable-find "find") "C:\\Windows")))
(setq projectile-indexing-method 'alien
projectile-generic-command "find . -type f"))
(setq projectile-sort-order 'recentf
projectile-cache-file (concat spacemacs-cache-directory
"projectile.cache")
projectile-known-projects-file (concat spacemacs-cache-directory
"projectile-bookmarks.eld"))
(spacemacs/set-leader-keys
2018-06-02 15:14:42 +00:00
;; File path
"fyC" 'spacemacs/projectile-copy-file-path-with-line-column
"fyD" 'spacemacs/projectile-copy-directory-path
"fyL" 'spacemacs/projectile-copy-file-path-with-line
"fyY" 'spacemacs/projectile-copy-file-path
;; Project
"p!" 'projectile-run-shell-command-in-root
"p&" 'projectile-run-async-shell-command-in-root
"p%" 'projectile-replace-regexp
"pa" 'projectile-toggle-between-implementation-and-test
"pb" 'projectile-switch-to-buffer
"pc" 'projectile-compile-project
"pd" 'projectile-find-dir
"pD" 'projectile-dired
"pe" 'projectile-edit-dir-locals
"pf" 'projectile-find-file
"pF" 'projectile-find-file-dwim
"pg" 'projectile-find-tag
"pG" 'projectile-regenerate-tags
"pI" 'projectile-invalidate-cache
"pk" 'projectile-kill-buffers
"pp" 'projectile-switch-project
"pr" 'projectile-recentf
"pR" 'projectile-replace
"pT" 'projectile-test-project
"pv" 'projectile-vc))
:config
(progn
2018-07-09 21:13:08 +00:00
(projectile-mode)
(spacemacs|hide-lighter projectile-mode))))