Commit graph

36 commits

Author SHA1 Message Date
Henrik Lissner
d8fda76c7d
yas-also-auto-indent-first-line = nil
Stop yasnippet from aggressively reindenting the whole snippet; assume
the user is expanding the snippet exactly where they want it.

Half-fixes #3211
2020-05-24 14:29:41 -04:00
Henrik Lissner
08f139391d
Bump :editor
PythonNut/evil-easymotion@79c13ed -> PythonNut/evil-easymotion@f96c2ed
abo-abo/lispy@c7e282a -> abo-abo/lispy@cdaa9c7
clemera/objed@8dc1770 -> clemera/objed@e89d8da
emacs-evil/evil-collection@493d523 -> emacs-evil/evil-collection@ba36304
emacs-evil/evil@8aa6337 -> emacs-evil/evil@d243eae
hlissner/doom-snippets@feaedeb -> hlissner/doom-snippets@422f683
hlissner/evil-snipe@3ec8adf -> hlissner/evil-snipe@2ba6353
joaotavora/yasnippet@ac03c2f -> joaotavora/yasnippet@5b1217a
mrkkrp/vimish-fold@d3248a4 -> mrkkrp/vimish-fold@6368523
redguardtoo/evil-nerd-commenter@747e346 -> redguardtoo/evil-nerd-commenter@1bd2de5

We're also transitioning from abbreviated SHA1 hashes to full ones. See
45cdfb125 for why.
2020-04-30 01:28:02 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
f8693d0f8c
Load snippets *after* yasnippet config in daemon 2020-04-24 04:07:57 -04:00
Henrik Lissner
06d5d5e6c0
General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00
Henrik Lissner
cf355d4d42
Bump :editor snippets
hlissner/doom-snippets@2a0c3cf -> hlissner/doom-snippets@feaedeb
joaotavora/yasnippet@ac03c2f -> joaotavora/yasnippet@5b1217a
2020-04-17 21:59:25 -04:00
Henrik Lissner
a7a5cbb7bf
editor/snippets: refactor & comment
And load snippets earlier in daemon sessions.
2020-04-17 21:58:55 -04:00
Henrik Lissner
5e65d0e063
Load yasnippet incrementally 2020-03-31 02:24:14 -04:00
Henrik Lissner
2869c020a0
Bump :editor
abo-abo/lispy@d6b19fe -> abo-abo/lispy@c7e282a
hlissner/doom-snippets@2781b78 -> hlissner/doom-snippets@2a0c3cf
joaotavora/yasnippet@3bf9a3b -> joaotavora/yasnippet@ac03c2f
joaotavora/yasnippet@3bf9a3b -> joaotavora/yasnippet@ac03c2f
noctuid/lispyville@56198f1 -> noctuid/lispyville@25a7012
2020-03-27 18:11:03 -04:00
Seong Yong-ju
86384b8533 Bump to hlissner/doom-snippets@2781b782a3 2020-02-04 20:44:11 +09:00
Henrik Lissner
373f1d532d
Bump to hlissner/doom-snippets@22c96ef
To include the following PRs:

+ hlissner/doom-snippets#27
+ hlissner/doom-snippets#26
+ hlissner/doom-snippets#23
+ hlissner/doom-snippets#21
+ hlissner/doom-snippets#20
2020-02-02 01:29:15 -05:00
Henrik Lissner
a9402cfb55
Fix #2373: bring back package pinning
This needs some serious refactoring...
2020-01-25 19:02:00 -05:00
Henrik Lissner
4cc14389e8
PIN ALL THE PACKAGES 2020-01-14 22:32:11 -05:00
Henrik Lissner
d0021461f7
Fix duplicate snippets
e.g. If you've cloned doom-snippets to $DOOMDIR/snippets.

Also refactors how yas-snippet-dirs is initialized.
2019-11-22 19:07:10 -05:00
Henrik Lissner
4657c9e9be
editor/snippets: fix error loading doom-snippets-lib 2019-10-29 01:10:25 -04:00
Henrik Lissner
3c6f48f9ec
Move evil & corrective keybinds to respective modules
Keybinds that correct behavior or provide or extend vim functionality
were moved to their respective modules, or to the :editor evil module.

Keybinds in the global space, that are particularly opinionated but
potentially harmful or imposing as a default, or likely for users to
change (like leader keys), are kept in config/default.
2019-10-26 23:44:28 -04:00
Henrik Lissner
66c45b2f8d
editor/snippets: update doom-snippets recipe 2019-10-26 13:48:01 -04:00
Henrik Lissner
e10cd8cf2e
Insult byte-compiler's mom
Yeah, that shut him up.
2019-09-20 23:10:53 -04:00
Henrik Lissner
81ee250c09
Minor refactor & revision across the board 2019-09-03 00:59:46 -04:00
Henrik Lissner
a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
Henrik Lissner
82ae3a73f3
def-advice!->defadvice! & conform to new advice conventions
This commit does two things:

- Renames def-advice! to defadvice!, in the spirit of naming convenience
  macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
  intent. A public advice function like doom-set-jump-a is meant to be
  used elsewhere. A private one like +dired--cleanup-header-line-a
  shouldn't -- it likely won't work anywhere but the function(s) it was
  made to advise.
2019-07-23 17:24:56 +02:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
88813ff196
Minor reformatting across the board
Gotta

Look

Nice
2019-07-22 22:34:08 +02:00
Henrik Lissner
33c220902e
editor/snippets: don't auto-enable yas-global-mode 2019-07-22 02:37:46 +02:00
Henrik Lissner
b90dede1ab
💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
Henrik Lissner
81ab3dbc5d
Simplify and decouple init files
The two doom-gc-* variables in init.el couples the rest of the config to
these two files. The bulk of GC/file-handler optimization was moved into
core.el and simplified (all that idle-timer voodoo was overkill).

Also adds (setq frame-inhibit-implied-reize t) to early-init, which
speeds up startup a fair bit in some edge cases with larger fonts.

squash! Simplify and decouple init files
2019-07-22 02:30:38 +02:00
Henrik Lissner
d12e7b831f
editor/snippets: load doom-snippets sooner
We want +snippets-dir to be first in yas-snippet-dirs. To ensure this,
doom-snippets should be loaded immediately before it is added to it, if
possible.
2019-07-14 22:47:15 +02:00
Henrik Lissner
62af55dad0
Move emacs-snippets -> doom-snippets
The repo was renamed upstream.
2019-07-14 17:05:48 +02:00
Henrik Lissner
05eb333a0c
editor/snippets: expand on snippet commands & keybinds
- Introduces the +snippets/new (SPC s n) command for creating a new
  private snippet
- Introduces the +snippets/new-lias (SPC s N) command for creating a new
  private snippet alias, which will invoke another snippet (you will be
  prompted to select one). This will only work with the emacs-snippets
  library bundled with Doom Emacs, however, as it depends on its API.
- Introduces +snippets/edit (SPC s c) for modifying existing snippets.
  How this differs from yas-visit-snippet-file is it will copy the
  contents of built-in snippets into a buffer primed for your private
  snippets (in DOOMDIR/snippets), while yas-visit-snippet-file will
  simply open the originating snippet.
- Introduces the +snippets/find (SPC s ?),
  +snippets/find-for-current-mode (SPC s /) and
  +snippets/find-private (SPC s f) commands for, respectively, finding a
  snippet file among *all* directories in yas-snippet-dirs, finding a
  snippet for the current major mode (plus parents), and finding a
  snippet from among your private library. This opens built-in snippets
  in read-only mode, but you can press C-c C-e to open it in
  +snippets/edit.
2019-07-12 20:41:50 +02:00
Henrik Lissner
a201409fdd
Minor refactors across the board 2019-07-10 21:27:12 +02:00
Henrik Lissner
e8c0ac9f30
Switch to insert mode after expanding snippets 2019-07-10 12:08:39 +02:00
Henrik Lissner
9a02bd8ac8
Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
Henrik Lissner
dcdebdb283
Convert +snippets/expand-on-region to advice
It's meant to be corrective, not alternative behavior.
2019-06-10 09:38:51 +02:00
Henrik Lissner
78cff4ef97
editor/snippets: yas-triggers-in-field = nil
Made TAB (move to next field) unpredictably expand sub-snippets.
2019-05-05 14:20:52 -04:00
Henrik Lissner
a4f9eb6f6c
Enable read-only-mode for built-in snippets
Because they shouldn't be edited out of ~/.emacs.d/.local -- if a
snippet in ~/.doom.d/snippets has the same name, built-in snippets will
be ignored.
2019-04-24 18:16:05 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00