Commit graph

37 commits

Author SHA1 Message Date
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
412063f452 lang/web: fix 'pair was never defined' error
Caused by recent change upstream, in smartparens
2018-11-12 02:38:09 -05:00
Henrik Lissner
cdf745e72a
map!: remove buffer-local :desc properties
which-key labels are registered globally, and will not work for
buffer-local keybinds. Until general is brought in, we'll have to suffer
label-less localleader keybinds.
2018-10-07 21:34:24 -04:00
Henrik Lissner
c7032cf8b0
lang/web: fully remove nil autopair group
This removes the nil autopair group, rather than just setting it to nil.
No functional different, it's [slightly] more performant.
2018-09-26 20:38:47 -04:00
Henrik Lissner
001f90df2f
lang/web: update set-docsets! & general refactor 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
b697ad982e
lang/web: more sensible html-tidy formatter config
+ No longer inserts html/body tags unless they're detected in the buffer
+ Respect tab-width and indent-tab-mode
+ Don't auto-remove empty elements
2018-09-03 03:59:24 +02:00
Henrik Lissner
fd8f8c5108
feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +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
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
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
Jeff Jewiss
68c0d228bc
support handlebars templates 2018-05-25 18:13:28 +01: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
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
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
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
45a490882f
lang/web: open templates/.+\.php$ in web-mode 2018-01-28 20:38:14 -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
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
c4888749b1
Remove pug-mode keybindings 2017-09-23 13:48:08 +02:00
Henrik Lissner
91783e0695
General refactor & cleanup 2017-09-15 14:37:20 +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
5491fd552e Replace nlinum with linum 2017-05-13 22:40:52 +02:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
191ddfd334 lang/web: move emmet-mode from +html.el to config.el; enable in css-mode 2017-03-23 15:47:38 -04:00
Henrik Lissner
3e63d2d23b Reduce def-package magic; explicitly use :when property 2017-03-19 22:47:50 -04:00
Henrik Lissner
45122cdea5 Fix keybindings + make them more consistent 2017-02-28 12:11:18 -05:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00