Commit graph

63 commits

Author SHA1 Message Date
Henrik Lissner
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
99fd8b4e1b
O'byte-compiler
Who forbade the obsolete,
Hooks, functions; adieu.

(And an unused argument too)
2019-02-03 18:42:09 -05:00
Henrik Lissner
b56639e31b
Remove deprecated set! & def-setting! macros 2019-01-05 17:48:46 -05:00
Henrik Lissner
cc36f9608e
feature/snippet: reformat README (WIP) 2019-01-03 01:52:06 -05:00
Henrik Lissner
91b76d8437
Move default snippets library to feature/snippets
Removes the +snippets flag from config/default. The default snippets can
be disabled by disabling the emacs-snippets package.
2018-11-02 18:43:44 -04:00
Henrik Lissner
ed0857b988
Fix invalid-function error on snippet prompt 2018-09-17 08:53:13 -04:00
Henrik Lissner
bcb444fa18
Enable yas-minor-mode in conf-modes too 2018-09-09 09:58:21 -04:00
Henrik Lissner
c58077810d
General refactor of modules
General code and comment improvements.

Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
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
596705dbda
Properly prioritize private snippets #852
In the previous solution, if *any* private snippets existed, *all*
non-private snippets were hidden.
2018-09-03 03:58:43 +02:00
Henrik Lissner
68e2b814e7
Fix stringp error when inserting new snippets #852
New snippets (created with yas-new-snippet) may not yet be associated
with a file when it is passed to the functions in yas-prompt-functions.
One of those functions, +snippets-prompt-private, prioritizes private
snippets over default ones, but determines which is which with
`file-in-directory-p`, which expects string arguments.

To fix this, we can safely assume that if a snippet has no associated
file, it is a private snippet.
2018-08-30 17:40:33 +02:00
Henrik Lissner
1490b9ec8d
Prioritize private snippets over built-in ones
In the case of snippet conflicts, you'd normally be prompted to select
which snippet you want. Built-in snippets are now disregarded if
conflicting private ones exist.

This makes it easier for users to add overriding snippets to
DOOMDIR/snippets.
2018-08-11 16:48:31 +02:00
Henrik Lissner
4941e327f4
General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
Henrik Lissner
14dfc9fad9
Add FIXMEs to def-setting!'s
They will be removed on the 2.1.1 release.
2018-06-24 17:13:23 +02:00
Alois Janíček
222702b15a
feature/snippets: add missing autoload cookie 2018-06-20 09:17:13 +02:00
Henrik Lissner
6ce30d0116
add-yas-minor-mode!: fix void-variable: mode error 2018-06-20 02:33:24 +02:00
Henrik Lissner
fa36014559
Allow set-yas-minor-mode! to accept multiple modes 2018-06-19 13:49:18 +02:00
Henrik Lissner
8f76ee9a8a
Refactor feature/snippets
+ Don't clear yas-minor-mode-map; the default keybinds can be useful,
  esp to non-evil users.
+ Moved +snippets|enable-project-modes hook to autoloads file.
+ Reformat yasnippet config.
2018-06-19 13:49:15 +02:00
Henrik Lissner
16b341e605
Move aya-persist-snippets-dir to doom-etc-dir 2018-06-19 12:01:51 +02:00
Henrik Lissner
17981d6a61
Conform hook names to conventions
Also minor reformatting & comment corrections.
2018-06-17 02:25:12 +02:00
Henrik Lissner
b5baeb81a7
Improve error handling in snippet commands
Fixes wrong-type-argument errors when fields or overlays are not
actually fields or overlays. Such heresy!
2018-06-16 12:22:50 +02:00
Henrik Lissner
4d017ae19e
Replace :yas-minor-mode with set-yas-minor-mode! 2018-06-15 18:03:50 +02:00
Henrik Lissner
37946080e2
Add :yas-minor-mode setting to feature/snippets 2018-06-07 02:51:46 +02:00
Henrik Lissner
1d9ae834f2
Minor refactors & docstring revision
These are not the refactors you are looking for.
2018-06-04 21:17:49 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
e33a3b2c63
feature/snippets: add doctor.el 2018-05-09 12:38:20 +02:00
Henrik Lissner
18b48cc841
feature/snippets: minor refactor 2018-05-08 01:01:21 +02:00
Henrik Lissner
183b061351
feature/snippets: add doom-private-dir/snippets to yas-snippet-dirs 2018-04-03 05:45:45 -04:00
Henrik Lissner
683e988952
feature/snippets: refactor +snippets/expand-on-region 2018-03-13 01:28:35 -04:00
Henrik Lissner
17d206a28f
feature/snippets: remap yas-insert-snippet instead
Rather than binding directly to +snippets/expand-on-region
2018-03-13 01:27:53 -04:00
Henrik Lissner
75cb7a3f0b
feature/snippets: fix backspace in snippet fields not deleting pairs 2018-03-05 13:42:40 -05:00
Henrik Lissner
3cbddbfd88
Generalize +evil-esc-hook into doom-escape-hook
This lets vanilla Emacs users in on having a universal "escape" key.
2018-01-06 02:38:39 -05:00
Henrik Lissner
9c9e9b2b59
feature/snippets: remove monkey patch (fix merged upstream) 2018-01-04 16:14:51 -05:00
Henrik Lissner
edc53706ba
feature/snippets: temporarily monkey-patch regression in yasnippet
See https://github.com/joaotavora/yasnippet/issues/883
2018-01-02 20:36:20 -05:00
Henrik Lissner
50c1ad0875
Fix esc not exiting snippets
Caused by a custom ESC keybind overriding +evil-esc-hook
2018-01-01 22:42:46 -05:00
Henrik Lissner
3708d76f51
feature/snippets: use default yas-snippet-dirs (harmless)
This is often overwritten by other modules anyway.
2018-01-01 16:17:24 -05:00
Henrik Lissner
e87b788078
Update & reformat module readmes for v2.0.9
+ completion/ivy
+ completion/company
+ feature/evil
+ feature/eval
+ feature/snippets
+ feature/workspaces
+ tools/neotree
2018-01-01 13:21:53 -05:00
Henrik Lissner
9fa60965a8
feature/snippets: remove evil hacks (experimental)
They don't seem to be necessary anymore. More testing is required.
2017-12-27 18:20:15 -05:00
Henrik Lissner
16df33a5b1
feature/snippets: simplify var config 2017-12-27 18:19:56 -05:00
Henrik Lissner
76a4ae459d
Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
Henrik Lissner
6b9849fd57
Add conditional autoload/compile cookies #229 2017-11-05 01:16:35 +01:00
Henrik Lissner
a24a3ef292
Fix unindexed file-templates on first load of yasnippet 2017-10-23 20:07:54 +02:00
Henrik Lissner
4ff80cf416
Add READMEs for several modules 2017-08-21 21:51:29 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
baad7953bf
Breaking change: rewrite add-transient-hook!
HOOK is now evaluated. Hooks should be quoted (and functions
sharp-quoted).

This also fixes commit 0150f78e.
2017-06-05 16:43:14 +02:00
Henrik Lissner
fbe782df22 Heavily redesign keybinding design
+ SPC and SPC m as leader/localleader (spacemacs-ey)
+ Move all custom keybindings to private +bindings.el file
+ Redesign+rearrange keybindings
2017-05-28 02:48:20 +02:00
Henrik Lissner
cce294fcf6 feature/evil: refactor evil-force-normal-state advice into +evil-esc-hook 2017-05-07 19:12:48 +02:00
Henrik Lissner
e204df3c05 Replace obsolete functions/commands 2017-04-17 02:19:20 -04:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
3a43e2fcfa feature/snippets: remove redundant hooks 2017-04-05 15:54:54 -04:00