Commit Graph

96 Commits

Author SHA1 Message Date
Brice Waegeneire
b29a7357c6 projectile: fd never use colors
Prevent projectile-find-file to be littered with escape codes when the
environment variable LS_COLORS is set.
2019-06-01 14:33:21 +02:00
Henrik Lissner
7443669b1e
Minor refactors & comment revision 2019-05-13 14:37:00 -04:00
Henrik Lissner
f2d267ce8b
projectile: fall back to git-grep instead of rgrep
Also changes projectile-sort-order, but this only affects the native
indexer.
2019-05-12 22:12:08 -04:00
Henrik Lissner
769cfbe5d1
projectile: resort to ripgrep if fd is absent
Speeds up file search in general, and on Windows especially.
2019-05-12 22:12:04 -04:00
Henrik Lissner
8e6953b3ac
Fix arrayp error when killing Emacs
Caused by doom|cleanup-project-cache, when a non-string key is present
in projectile-projects-cache (which will be removed).
2019-05-06 17:12:28 -04:00
Henrik Lissner
eb22177cea
Suppress kill-emacs-hook in noninteractive Doom 2019-04-24 18:16:06 -04:00
Henrik Lissner
4278eb683f
Autoload projectile-add-known-projects
This should be PRed upstream at some point
2019-04-20 19:25:10 -04:00
Henrik Lissner
f9b6f6746f
General, minor refactor/reformatting 2019-04-08 23:03:19 -04:00
Henrik Lissner
742687a51e
Add delq! and pushnew! macros
And move projectile configs to their respective modules (and out of
package configs).
2019-04-08 23:01:30 -04:00
Shanavas M
d974acfef1 Use variable for fd-find binary name 2019-04-01 12:18:12 +05:30
Henrik Lissner
c0b00327c2
Purge excess from projectile's cache
Bloated projectile caches can cause freezing and delays. This is
especially so if you accidentally index $HOME or /, which will bloat
them into the hundreds of MBs.

+ Adds purging of blacklisted, over-sized and non-projects from
  projectile's cache when Emacs is killed.
+ Projectile's project file cache will now expire after a week.
+ Corrects file paths in core/doctor's filesize checks.
2019-03-28 19:57:34 -04:00
Henrik Lissner
0085d089f3
Refactor doom*projectile-locate-dominating-file 2019-03-28 16:43:04 -04:00
Henrik Lissner
c9e3facb38
Revert bb3f027c
After more testing (along with 1ce2b291), projectile can, in fact, be
deferred until after startup.
2019-03-16 23:59:50 -04:00
Henrik Lissner
93d2a2212d
Restore projectile's :after-call
If users open Emacs with a file argument, projectile will need to load
sooner.
2019-03-15 13:30:52 -04:00
Henrik Lissner
8da2785141
Remove doom-project file/dir local var support
It didn't really work, and it's too Doom-specific to be useful. We'll
need better heuristics.
2019-03-14 17:59:24 -04:00
Henrik Lissner
bb3f027ca2
Load projectile sooner in the startup process
Projectile's use is so prolific in Doom that trying to lazy load it at
startup is wasted breath.
2019-03-14 17:59:24 -04:00
Henrik Lissner
1ce2b29193
ui/modeline: minor startup optimization
Prevents project.el from being eager-loaded at startup.
2019-03-13 18:46:06 -04:00
Henrik Lissner
df26502f01
Avoid general in core
Future proofing against changes in load order.
2019-03-10 08:12:04 -04:00
Henrik Lissner
54d1c0dd56
Minor, general refactors 2019-03-09 03:42:55 -05:00
Henrik Lissner
d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
Aria Edmonds
81e8fafa18 Improve projectile-git-command
When indexing it ignores hidden files, which is especially annoying for
dotfiles where everything starts with a dot. If you just have -H it'll
index .git too though, so we exclude that
2019-01-18 19:40:09 +11:00
Henrik Lissner
f003d2b4fe
Merge pull request #1032 from mfiano/develop
Various changes
2018-12-05 18:59:42 -05:00
Aria
fe8b17d6da move projectile fd out of magit.el
lol
2018-12-04 20:09:44 +11:00
Michael Fiano
9c96a2bab7 Fix: Prevent projectile from deleting important buffers 2018-12-02 02:02:56 -05:00
Henrik Lissner
1785adb068 projectile-require-project-root = t
Now that projectile-project-root has changed not throw errors (depending
on projectile-require-project-root), it is safe to change this, in case
you use other projectile commands that do require a project.
2018-09-28 21:13:27 -04:00
Henrik Lissner
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
078e3028a6 Minor, general comment revision 2018-09-28 21:02:59 -04:00
Henrik Lissner
4bdd6002a4
Restore projectile-project-root's old behavior
For now...
2018-09-27 21:55:19 -04:00
Henrik Lissner
57579b883b
Refactor doom core files 2018-09-09 09:58:20 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
d7e4901bda
Disable bottom-up root search if HOME is a project #833 2018-08-26 12:19:47 +02:00
Henrik Lissner
e348e32cbc
Fix def-project-mode! :add-hooks overwriting hooks
Would overwrite hooks previously added to the project mode.
2018-08-11 01:59:36 +02:00
Henrik Lissner
a3124f00d5
Remove redundant projectile-indexing-method setter 2018-08-01 19:26:48 +02:00
Henrik Lissner
9a2f96c0f1
Lazy load projectile (experimental)
I can feel it; the power coursing through my veins. Every millisecond
saved at startup makes me more powerful. This world will be mine. Mine I
tell you!
2018-06-16 11:42:37 +02:00
Henrik Lissner
5501b949ef
Refactor def-project-mode! with cl-defmacro 2018-06-16 11:34:19 +02:00
Henrik Lissner
b207c4040b
Minor, general refactor 2018-06-07 02:51:46 +02:00
Henrik Lissner
52a04fd8c6
Optimize file-exists-p! & project-file-exists-p! 2018-06-04 21:17:49 +02:00
Henrik Lissner
4ee0b5ba6d
New macros file-exists-p! & project-file-exists-p!
The latter replaces the doom-project-has! macro
2018-05-24 21:15:17 +02:00
Henrik Lissner
8da3f56795
core-project: rename autoload-project-mode => init-project-mode
To be consistent with other initializing hooks.
2018-05-20 12:18:16 +02:00
Henrik Lissner
bec79a3d4c
Major refactor of Doom bootstrap process
+ New `input` and `buffer` support for :defer in def-package! can now
  defer packages until the first command invoked after startup or first
  interactive buffer switch, respectively
+ Exploit these new :defer techniques to lazy-load many core packages,
  netting Doom a 20-30% decrease in startup time
+ Various userland macros (like package!, def-package-hook!, packages!,
  and disable-packages!) will now throw an error if used incorrectly
  (i.e. outside of their intended files; e.g. package! should be used in
  packages.el files)
+ Removed support for multiple/nested doom! calls. There should only be
  THE ONE in ~/.doom.d/init.el (or ~/.config/doom/init.el)
+ Fix an issue where load-path and auto-mode-list modifications would
  not persist because doom-packages-file was cached too late.
+ Added package-activated-list to cached variables in
  doom-packages-file, thus we no longer need custom-file.
+ Load Doom core files from doom-initialize. Now doom-initialize can be
  called from state-dependent non-interactive functions, instead of
  reloading core/core.el, which was clumsy
+ Removed the doom-post-init-hook hook. There was no reason for it to
  exist when doom-init-hook can simply be appended to
2018-05-14 20:37:13 +02:00
Henrik Lissner
3ad39af712
Add HOME & /tmp to projectile-ignored-projects 2018-05-07 19:26:31 +02:00
Henrik Lissner
0b33e729e0
Projectile: ignore ./node_modules & ./flow-typed 2018-04-29 22:53:06 -04:00
Henrik Lissner
3777474471
Don't remove projectile-root-local from root file functions
Doesn't do anything for the cache.
2018-03-20 03:39:03 -04:00
Henrik Lissner
ce091ddde6
Improve reliability of 'nocache & without-project-cache! macro 2018-03-14 18:29:16 -04:00
Henrik Lissner
f113f99484
projectile-indexing-method = native (on windows) 2018-02-19 20:27:47 -05:00
Henrik Lissner
dce496e246
Change doom-project-p to return a boolean 2018-02-06 17:30:38 -05:00
Henrik Lissner
f28a89f701
Add doom-project-name function 2018-02-06 17:30:16 -05:00
Henrik Lissner
508dbf7a5c
Revise docstrings for doom-project-{root,p} 2018-02-06 17:30:03 -05:00
Henrik Lissner
7e31d1c5af
Add nocache arg to doom-project-* functions 2018-02-01 01:31:26 -05:00
Henrik Lissner
3bd262117d
Initialize project-mode sooner
Fixes a couple projectile errors when parts of Doom try to use
projectile before it's loaded.
2018-01-28 16:28:53 -05:00