Commit graph

35 commits

Author SHA1 Message Date
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
60b595321e Lazy-load yasnippet harder for faster first-file load time
+ Rather than waiting for the first "interactive" major mode to be
  visited to activate yas-minor-mode, we wait until the first time the
  user invokes a snippet command to activate yas-global-mode.
+ yas-reload-all is one of the bottlenecks when loading a file for the
  first time. Deferring it further should help with this.
+ yas-global-mode reaches more major modes than our former list of
  hooks (fixes #5140).

Closes #5140
2021-06-05 13:12:00 -04:00
Henrik Lissner
5c06edd90a
lang/web: fix comments not joining/filling correctly
Before, joining these two lines

  // hello
  // world

Results in

  // hello // world

And filling the following

  // Pretend this line is longer than 80 characters

Becomes

  // Pretend this lineis longer than
  80 characters
2020-11-09 17:19:14 -05:00
Henrik Lissner
b96b6ed64e
Fix /* and /** expansion in various languages
Also adds +web-continue-block-comments option to control:

/*
 *
 */

vs

/*

*/

Has a known issue where the indentation for the closing delimiter is off
by one when +web-continue-block-comments is disabled. Will have to look
into that later.
2020-11-09 17:19:14 -05:00
Henrik Lissner
0e7d5b5490
Fix #4027: tab not invoking emmet at EOB 2020-10-05 16:04:13 -04:00
Henrik Lissner
73565f1041
Only expand emmet snippets if at word boundary
Makes emmet a little less aggressive on TAB.

Addresses #3383
2020-09-01 19:35:54 -04:00
Yiming Chen
d329ff2a30 Add {little,greater}-than to +web-entities-list 2020-01-28 12:17:51 +08:00
Henrik Lissner
a15ab4a3f2
lang/web: add bang to :enhtml & :dehtml
BANG = copy result to clipboard instead of inserting into buffer.
2019-12-20 23:04:07 -05:00
Henrik Lissner
64222c69c8
Fix wrong-number-of-arguments on newline-and-indent
And ensure all custom comment-line-break-function functions its
argument requirements.
2019-11-12 15:24:02 -05:00
Henrik Lissner
060ede0e2e
General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
Henrik Lissner
6d314c2795
Revise and update docstrings and comments 2019-05-01 21:02:28 -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
Henrik Lissner
29ad900c1f
lang/css: refactor +css/toggle-inline-or-block
Replaces instances of replace-regexp (interactive-only functions),
removing the need for with-no-warnings and quiet!.

Improves regexp responsible for compacting whitespace in between
properties, which reduces compaction of whitespace in string arguments.
2018-09-27 22:44:07 -04:00
Henrik Lissner
2df2622329
lang/web/autoload/css: escape braces
Prevents auto-formatting of braces by tools like parinfer.
2018-08-31 02:40: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
Henrik Lissner
399f3538ce
lang/web: fix +css/toggle-inline-or-block 2018-05-08 15:19:09 +02: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
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
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 & 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
59c5a78940
Refactor lang/web/autoload/html 2017-07-04 13:10:36 +02:00
Henrik Lissner
7477546892
Fix lang/web's html entity encode/decode functions
Also, add unit tests and don't encode spaces.
2017-07-03 03:39:18 +02:00
Henrik Lissner
822c78554f
destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +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
62a69bee3d lang/web: fix {en,de}code-html-entities commands 2017-04-22 21:45:14 -04:00
Henrik Lissner
e204df3c05 Replace obsolete functions/commands 2017-04-17 02:19:20 -04:00
Henrik Lissner
ed2e7a65f6 Refactor out s.el usage 2017-04-17 02:18:25 -04:00
Henrik Lissner
648c4c1d3b Update lang modules' :build settings 2017-04-07 01:46:33 -04:00
Henrik Lissner
62e906cf19 lang/web: add +css/toggle-inline-or-block command 2017-04-03 13:18:02 -04:00
Henrik Lissner
53b9e92fd7 lang/{web,javascript}: remove +web-bower-mode; refactor react, phaser & angular detection 2017-04-01 23:54:30 -04:00
Henrik Lissner
3ac1d382be Fix project mode definitions 2017-03-02 18:28:46 -05:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00