Commit graph

131 commits

Author SHA1 Message Date
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
Henrik Lissner
d4c1050e32
core-project: fix projectile caching error when buffer-file-name is nil 2018-01-28 04:31:14 -05:00
Henrik Lissner
560548db33
core-projects: refactor projectile var init 2017-12-31 18:32:56 -05:00
Henrik Lissner
3e41c11138
Refactor core-projects; fix autoload-project-mode & doom-project-hook
+ doom-project can now be a symbol or list of project modes.
+ doom-project-hook hooks are promised to receive the mode symbol and
  state, but until now only received the former.
+ Add docstrings to doom-project-{find-file,browse}.
+ doom|autoload-project-mode is now on find-file-hook instead of
  after-change-major-mode (which fires it way too many times).
2017-12-31 11:35:39 -05:00
Henrik Lissner
d9175748b7
Remove (interactive) from doom-project-{find-file,browse}
These aren't meant to be interactive.
2017-12-31 11:13:58 -05:00
Henrik Lissner
6d7a6a80b2
Fix projectile not tracking directories #308 2017-12-31 11:09:47 -05:00
Henrik Lissner
88a3732ae7
Add doom-project-{find-file,browse} functions 2017-12-23 02:09:40 -05:00
Henrik Lissner
9d81bc5a8b
Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
Henrik Lissner
95a5b46dc5
New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
Henrik Lissner
9a959e73bc
projectile: ignore doom-local-dir properly 2017-10-23 20:09:01 +02:00
Henrik Lissner
8fc1c46dca
Initialize projectile variables before loading projectile
Fixes #236
2017-10-08 13:10:01 +02:00
Henrik Lissner
cd7ab060e0
General refactor & docstring updates 2017-10-05 17:02:59 +02:00
Henrik Lissner
3fe9ea2b2e
Redesign def-project-mode! macro & update references
+ Renamed :init to :on-load (run once, the first time the project mode
  is activated).
+ New properties :on-enter FORM and :on-exit FORM (run each time the
  mode is enabled or disabled, respectively).
+ New property :hooks HOOKS (automatically add HOOKS to mode-hook).
2017-10-04 18:00:23 +02:00
Henrik Lissner
55f584646b
Add :hook property to def-project-mode! 2017-10-03 15:44:57 +02:00
Henrik Lissner
6cb5efc929
core-lib: rename helper fns; move doom-resolve-vim-path
+ doom--resolve-paths => doom--resolve-path-forms
+ doom--resolve-hooks => doom--resolve-hook-forms
+ +evil*ex-replace-special-filenames => doom-resolve-vim-path
2017-09-27 01:23:54 +02:00
Henrik Lissner
65e142fdd1
core-projects: refactor & update
+ Use new structure for projectile-other-file-alist
+ Refactor variable assignment
+ Rewrite for new, updated projectile-project-root
2017-09-20 01:44:52 +02:00