Commit Graph

65 Commits

Author SHA1 Message Date
48af60bb38 Remove redundant :mode from c-mode file template 2018-07-17 03:20:58 +02:00
e97fd7558c Allow file template :trigger to be a function 2018-07-14 23:16:38 +02:00
5a7c8803d9 Remove :when support from after!; add defer-until!
New macro does what the :when keyword did for after!.
2018-06-27 21:29:28 +02:00
aa70213f87 Fix "Keyword argument :when not one of" error
Occurs when expanding file templates with a :when clause.
+file-templates--expand wasn't anticipating it; throwing that error.
2018-06-24 22:23:09 +02:00
f6dc6ac74e Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
5531d7115a Fix indentation for many autodef setters 2018-06-22 01:49:21 +02:00
0d19b9e61c Refactor +file-templates--expand 2018-06-22 01:49:21 +02:00
8bd9b24137 Add unset capability to set-file-template! 2018-06-22 01:49:20 +02:00
50b34d2671 Fix org-mode file template precedence
Otherwise default .org template always takes precedence.
2018-06-20 18:39:44 +02:00
95b227f9fe Fix docstring references to old settings 2018-06-19 15:01:25 +02:00
5ec74fdffb Add Solidity Template
Add Trigger and basic file template
2018-06-18 20:29:37 -05:00
ca2c8b5a45 Minor refactor, across the board
Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
2018-06-18 15:02:24 +02:00
02caf4eeac Fix file templates expanding non-interactively #553
File templates should not expand unless the current file was opened
interactively. We use a simple heuristic to detect this: if the opened
buffer's is visible or not.
2018-06-16 12:23:47 +02:00
2496e0348d Add :when support to after!
This lets you delay a body of code until an arbitrary condition is
met (which is checked whenever a file is loaded).

Also refactors set-file-template! to wait until +file-templates-alist is
defined.
2018-06-15 03:42:01 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
818cb27724 Refactor feature/file-templates
This removes its dependency on the feature/snippets.
2018-06-03 23:43:27 +02:00
e8653d0628 feature/file-templates: revise doom module README.org file template 2018-05-24 22:34:37 +02:00
b806ff937c feature/file-templates: rewrite & fix wrong-number-of-args errors #602 2018-05-24 22:34:37 +02:00
5abdeed8fd feature/file-templates: rewrite without autoinsert
autoinsert was more trouble than it was worth, so I reinvented a better
wheel.
2018-05-18 01:47:03 +02:00
d32e500f97 feature/file-template: refactor for idempotency 2018-05-16 18:26:08 +02:00
06f7aa2881 feature/file-templates: fix doom module templates
There were cases where certain Doom module templates weren't correctly
expanded (when your private directory is symlinked).
2018-05-16 18:24:52 +02:00
ccc0f9b7f3 Henrik doesn't maintain my Docker images 2018-04-14 17:21:15 +01:00
98a4a94867 Update webpack file template for latest version
Webpack 4 has some syntax changes, mainly using rules key instead of plugin.
2018-03-26 22:27:09 +01:00
691c914a15 feature/file-templates: improve regexp for doom templates 2018-03-23 17:15:31 -04:00
9b0a2d222e feature/file-templates: new :file-template setting 2018-03-02 23:26:58 -05:00
af5261cf6b feature/file-templates: fix doom readme template 2018-02-20 02:45:57 -05:00
2dd2ff7ff2 feature/file-templates: refactor & lazy load 2018-02-20 02:16:07 -05:00
50452d92ae feature/file-templates: fix incorrect mode setting 2018-02-18 14:11:04 -05:00
a8b178f547 feature/file-templates: remove __lic alias
There's no guarantee that %alias will be available from here anyway.
2018-02-18 02:48:25 -05:00
a862d0eeb1 feature/file-templates: fix doom file templates 2018-02-17 19:15:13 -05:00
ef4962c702 feature/file-templates: new +file-templates/insert-license command 2018-02-17 18:41:21 -05:00
aa216af4d6 feature/file-templates: add+polish license file templates 2018-02-17 18:40:49 -05:00
78fe91ce10 feature/file-templates: update header line in doom templates 2018-02-16 02:12:58 -05:00
0e1cf10c0f Update doom module readme file template 2018-02-14 07:47:22 -05:00
f646c969e7 Fix doom module file templates when emacs.d is a symlink 2018-01-01 21:16:36 -05:00
ff13fb854a Fix file template for Doom module readmes 2018-01-01 16:14:06 -05:00
14f310e199 Fix some file-templates not being inserted
Because yas--lookup-snippet-1 uses the template's description, rather
than its trigger key as its lookup key. Doom expects it the other way
around, which is the case when a file template doesn't define a name: in
the snippet.
2018-01-01 16:11:03 -05:00
9a71a73538 General, minor refactor 2017-12-27 18:19:33 -05:00
01042192b8 Fix file-templates in doom-emacs directory 2017-12-27 18:15:44 -05:00
c5a7d2cb25 add fish-mode file-template. 2017-12-26 15:08:45 +08:00
07088d3dcf Removed s.el dependency (prefer built-in) 2017-12-09 14:40:14 -05:00
213e933a80 Disable file template for .dir-locals.el files 2017-10-28 18:07:38 +02:00
a24a3ef292 Fix unindexed file-templates on first load of yasnippet 2017-10-23 20:07:54 +02:00
1e95dc530a Add zunit file template & file extension 2017-10-06 02:37:24 +02:00
33a49ce4dc Add unit test file template 2017-10-05 01:27:46 +02:00
1bd096ceb8 Remove lb6 file templates (unused) 2017-10-03 02:58:09 +02:00
be2f0a043d feature/file-templates: minor refactor 2017-09-24 17:10:48 +02:00
11e55a5a4f Add *.org file template 2017-08-21 21:52:48 +02:00
ce723d63cc Add file template for doom module READMEs 2017-08-21 21:51:29 +02:00
822c78554f destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +02:00