Commit graph

85 commits

Author SHA1 Message Date
Henrik Lissner
c514ad200a
Remove web-beautify from javascript & web modules
Superceded by :editor format module, which uses prettier.
2018-08-25 00:06:13 +02:00
Henrik Lissner
3cddbd1949
Fix void-variable string #809 2018-08-16 02:18:44 +02:00
Henrik Lissner
40a900f533
lang/web: fix Emacs<26 incompatibility #806
The regexp argument for string-trim-right was introduced in 26.1.
2018-08-15 21:19:59 +02:00
Henrik Lissner
8248e80570
Improve web-mode + smartparens compatibility
This addresses two edge cases:

1. if web-mode-auto-close-style == 3, <'s behavior may insert an extra
   >
2. Some web-mode engines have pairs that end with smartparens pairs,
   which will result in web-mode inserting its closing pairs _and_
   smartparens inserting its closing pairs; resulting in extra
   characters.

Reported by @ar1a
2018-08-04 13:43:15 +02:00
Henrik Lissner
a876d87f5e
emmet-mode: bind to TAB & enable in reason-mode
TAB now either indents, expands the snippet at point, or expands the
emmet expression at point.

Also it now falls back to emmet-expand-line if yasnippet won't load.
2018-08-01 19:25:06 +02:00
Aria
90d09e6f93 Highlight-numbers on every prog-mode 2018-07-29 12:19:56 +10:00
Henrik Lissner
0ee42c1df0
Improve smartparens+web-mode compatibility
+ Enables web-mode's autopairing functionality
+ Prevents duplicate >'s after web-mode autopairing.
+ Leave longer-than-3-character pairs to smartparens (there was only
  <!-- -->)
+ Remove <?p -> <?php | ?> autopairer. Leave that to snippets (web-mode
  doesn't support prefixes longer than 3 letters, and <?php ?> is too
  much of a performance drain to have smartparens support it, so I added
  a "php" snippet that expands to <?php | ?>).
+ Tags now auto-close when you finish typing the opening
  tag. (web-mode-auto-close-style = 2)
2018-06-24 16:31:13 +02:00
Henrik Lissner
c78c6495f1
Apply /* and /** pairs to more modes
Including js, ts, rjsx, rust, all C modes, php, and all css modes (scss,
less, and stylus).

Requested by @ar1a
2018-06-24 16:31:13 +02:00
Henrik Lissner
b99ab59578
Replace :docset with set-docset! autodef 2018-06-15 16:20:20 +02:00
Henrik Lissner
eaca8c58fa
Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
Henrik Lissner
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
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Jeff Jewiss
68c0d228bc
support handlebars templates 2018-05-25 18:13:28 +01:00
Henrik Lissner
9a8b6a82e2
lang/web: add doctor.el 2018-05-25 01:01:25 +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
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
bed5a2f305
lang/web: add *.jinja to web-mode 2018-05-17 12:26:42 +02:00
Henrik Lissner
803511c771
lang/web: disable company-css in Emacs 26+
css-mode's built-in completion is superior in Emacs 26+. The
company-capf backend will take advantage of it.
2018-05-17 12:22:27 +02:00
Benjamin Reynolds
9ac15aa0c1 Add [slim-mode] to :lang web +html
[slim-mode]: https://github.com/slim-template/emacs-slim
2018-05-14 20:30:28 -05:00
Henrik Lissner
8cab2f19fd
Remove redundant config & auto-mode-alist entries
Much of this config is done in package autoloads, and now that
auto-mode-alist is cached in doom-package-alist (after reading autoload
files), we can save some space by removing redundant config.
2018-05-14 20:48:14 +02:00
Henrik Lissner
fbb2a710b5
lang/web: add css library tests 2018-05-08 15:19:27 +02:00
Henrik Lissner
399f3538ce
lang/web: fix +css/toggle-inline-or-block 2018-05-08 15:19:09 +02:00
Henrik Lissner
168cb74794
Replace add-hook! with setq-hook! where possible 2018-05-07 22:37:19 +02:00
Henrik Lissner
6b573bc66b
Refactor :lang auto-mode-alist entries 2018-05-07 19:26:31 +02:00
Henrik Lissner
45bc6e49d3
lang/web: web-mode-enable-auto-quoting = nil 2018-04-28 15:54:39 -04:00
Henrik Lissner
33ad8ba4a4
lang/web: reformat whitespace in keybinds 2018-04-05 02:26:19 -04:00
Henrik Lissner
7699c3d2ce
lang/web: restore smartparens-mode in web-mode 2018-04-04 06:58:18 -04:00
Henrik Lissner
b701303909
lang/web: emmet-expand-jsx-className = t in rjsx-mode 2018-04-02 22:02:32 -04:00
Ben Johnson
9ebab55a3f
lang/web: add local leader bindings for web-mode
Web mode has a bunch of helpful commands under `C-c`, this replicates the same
bindings, but in leader-key style. E.g.: `C-c C-a k` becomes `SPC m a k`
2018-03-29 04:45:28 -07:00
Dragnucs
20dd751792
Add twig files
Twig files already work nice with web-mode. So detecting them here.
2018-03-19 10:47:06 +00:00
Henrik Lissner
8bd68064ef
lang/web: register docsets for css, scss & sass 2018-03-14 18:50:10 -04:00
Henrik Lissner
45096c2ab6
lang/web: change counsel-css source (now on MELPA) 2018-03-02 19:14:45 -05:00
Henrik Lissner
0fb72805ab
lang/web: new comment-indent-function for css/scss-mode
Adds +css/comment-indent-new-line, since the built-in default performs
poorly in CSS buffers. This is experimental.
2018-02-14 20:58:38 -05:00
Henrik Lissner
5bee5c95ee
lang/web: refactor +css/toggle-inline-or-block
Remove evil dependency + make more robust.
2018-02-14 20:55:43 -05:00
Henrik Lissner
da84850ced
lang/web: remove company-yasnippet from css modes 2018-02-10 15:13:08 -05:00
Henrik Lissner
741612a965
lang/web: fix wrong-number-of-args error in +css/toggle-inline-org-block 2018-02-09 23:24:34 -05:00
Henrik Lissner
45a490882f
lang/web: open templates/.+\.php$ in web-mode 2018-01-28 20:38:14 -05:00
Henrik Lissner
acb77c8407
lang/web: conditionally define js sub-modes 2018-01-28 04:28:15 -05:00
Dragnucs
32c3dd847e
Add Vue file to web mode
Support `.vue` Vue.js files in web-mode.
2018-01-09 11:27:48 +00:00
Henrik Lissner
f9de4fd7b7
lang/web/+css: wrap sp config in after! block 2017-12-08 23:14:13 -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
bac286e8e2
Remove blank autoload files 2017-11-05 01:16:35 +01:00
Henrik Lissner
6b9849fd57
Add conditional autoload/compile cookies #229 2017-11-05 01:16:35 +01:00
Henrik Lissner
07867c478d
lang/web: add &amp; entity to +web-entities-list 2017-10-18 00:02:14 +02:00
Henrik Lissner
cd7ab060e0
General refactor & docstring updates 2017-10-05 17:02:59 +02:00
Henrik Lissner
b825b0cd0c
lang/web: refactor +web-jekyll-mode 2017-10-04 18:02:14 +02:00
Henrik Lissner
ed76cfda99
General lang refactor; new refactor, help, build & test menus 2017-10-03 02:58:09 +02:00
Henrik Lissner
d0fcb23314
Replace feature/eval build system with def-menu! 2017-10-03 02:58:09 +02:00
Henrik Lissner
30567ea0f7
Install company-web only if company is active 2017-09-23 13:48:08 +02:00
Henrik Lissner
c4888749b1
Remove pug-mode keybindings 2017-09-23 13:48:08 +02:00