aboutsummaryrefslogtreecommitdiffstats
path: root/oni-projectile.el
blob: 23ffafb5c7ddcf4d9d6f56d823aefe6d85128f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
;;; oni-projectile.el --- Projectile configuration   -*- lexical-binding: t; -*-

;; Copyright (C) 2019  Tom Willemse

;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2023.0911.203005
;; Package-Requires: (projectile oni-data-dir)

;; 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 <https://www.gnu.org/licenses/>.

;;; Commentary:

;; Projectile configuration.

;;; Code:

(require 'oni-data-dir)
(require 'projectile)

(setq projectile-known-projects-file
      (oni-data-dir-locate "projectile-bookmarks.eld"))

(setq projectile-mode-line-prefix " P")

(setq projectile-cache-file (oni-data-dir-locate "projectile.cache"))

(setq projectile-completion-system 'auto)

(add-to-list 'projectile-project-root-files "yarn.lock")
(add-to-list 'projectile-project-root-files "fabfile.py")

(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)

(when (eq system-type 'windows-nt)
  (setq projectile-enable-caching nil)
  (setq projectile-generic-command "\"C:\\msys64\\usr\\bin\\find.exe\" . -type d \"(\" -path \"*/node_modules\" -o -path \"*/upload-test\" -o -path \"*/dlls\" -o -path \"*/apps/*/img\" -o -path \"*/apps/*/video\" -o -path \"*/apps/*/font\" -o -path \"*/apps/*/content\" -o -path \"*/apps/*/favicons\" -o -path \"*/apps/*/pages.*\" -o -path \"*/.intl\" \")\" -prune -o -type f -print0")
  (setq projectile-indexing-method 'alien))

(provide 'oni-projectile)
;;; oni-projectile.el ends here