Commit Graph

113 Commits

Author SHA1 Message Date
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
4c4a35ae86 Minor reformatting
It's no big deal. Really.
2018-06-23 22:22:42 +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
e05d7cfee0 Change flycheck initialization strategy
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.

Indirectly fixes #710
2018-06-22 01:49:20 +02:00
6fbd3407e0 Fix block/jsdoc comment continuation in typescript
Also improves writing block comments in js2-mode and rjsx-mode.

Reported by @ar1a
2018-06-20 14:25:05 +02:00
4ef2ff8797 lang/javascript: fix set-pretty-symbols! 2018-06-20 18:29:04 +10:00
ec8ae0bedc Add :ui pretty-code & set-pretty-symbols! autodef
Along with defaults for C/C++, elm, elisp, js, typescript, web-mode, and
org-mode. Thanks to @ar1a for inspiration.
2018-06-16 19:32:25 +02:00
c0251aacee Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
bfdc00cf42 Prevent tide-mode error when node isn't installed
This error prevents you from opening js files.
2018-06-15 17:15:25 +02:00
c3d3638832 Fix js defvaralias errors in Emacs 27
In later versions of Emacs, if a var alias is created *after* it has
been assigned a value, an error is thrown. This prevents the user from
opening js files.
2018-06-15 17:12:54 +02:00
588359cc5f Replace :eval/:repl with autodef functions
+ :eval => set-eval-handler!
+ :repl => set-repl-handler!
+ Updates all internal references.
2018-06-15 16:20:20 +02:00
9f0ebe42e8 Replace :electric with set-electric-rules!
And general refactor of the emacs/electric-indent module.

Also updates (set! :electric ...) references in various :lang modules
2018-06-15 13:32:07 +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
3bdb3d4e5d Update uses of associate! 2018-06-01 02:20:00 +02:00
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
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
53a7e35082 lang/javascript: fix rjsx-electric-gt reparsing advice 2018-05-22 01:47:40 +02:00
bb88411cc9 General minor refactor & docstring fixes 2018-05-14 20:55:55 +02:00
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
ff5d63b5a6 lang/javascript: add colon to electric chars 2018-05-14 13:05:03 +02:00
437d4c8dda fix(lang/javascript): add flycheck-mode to typescript-mode hooks 2018-05-04 10:10:08 +02:00
8d81975fa7 lang/javascript: enable tide-completion-detailed & tide-always-show-documentation 2018-04-29 22:52:32 -04:00
ed1ede4385 lang/javascript: fix electric > not closing tags in rjsx-mode 2018-04-28 16:04:11 -04:00
5c49d9c7c0 lang/javascript: don't look for import preact
Incorrect way to import preact.
2018-04-27 03:28:53 -04:00
37b2563dd1 lang/javascript: detect preact import (for rjsx-mode) 2018-04-26 17:56:58 -04:00
ac570f3f18 lang/javascript: revise refactor menu; add tide-organize-imports 2018-04-23 20:49:21 -04:00
135ebd925f Enable global-eldoc-mode; less work for me! 2018-04-23 00:34:03 -04:00
15c735a053 lang/javascript: fix :company-backend typo 2018-04-23 00:28:32 -04:00
855ad2c0f1 lang/javascript: refactor company/lookup config; bring back xref-js2 2018-04-22 23:57:32 -04:00
581e1fc56c lang/javascript: add autoload for skewer-repl 2018-04-20 02:47:02 -04:00
a9d70f808c lang/javascript: use eslint_d for syntax checking in eslintd-fix-mode 2018-04-20 02:47:02 -04:00
595d6215d2 lang/javascript: general refactor
+ No need for some rjsx-mode hooks, when it is derived from js2-mode
  (thus, js2-mode hooks will run in rjsx-mode).
+ Reorganized package configs with major modes at the top.
+ Fix incorrect usage of add-hook! with three arguments for rjsx-mode.
2018-04-20 02:47:02 -04:00
c08f6b25d9 lang/javascript: use correct hooks for jsx-mode #540 2018-04-19 04:01:50 -04:00
da7975feff lang/javascript: fix +javascript/refactor-menu 2018-04-19 03:59:58 -04:00
eef89da872 lang/javascript: remove xref-js2 (superceded by tide) 2018-04-19 03:57:11 -04:00
71192bf09a lang/javascript: start tide in rjsx-mode buffers #540 2018-04-19 03:45:08 -04:00
605c897d96 lang/javascript: doom-project-root support & clean up processes for tide 2018-04-19 00:51:51 -04:00
185f47d2aa lang/javascript: disable tide-hl-identifier-mode by default 2018-04-19 00:51:12 -04:00
c156551dd1 lang/javascript: minor reformatting/comment revision 2018-04-19 00:50:54 -04:00
8625cb03b0 lang/javascript: remove vestigial eslint_d support 2018-04-19 00:50:35 -04:00
e54c938023 Merge lang/typescript into lang/javascript 2018-04-18 18:17:17 -04:00
c4396226dd lang/javascript: remove eslint_d detection
This is now left to the user's private config.
2018-04-18 18:08:52 -04:00
cc5bfc6dc0 lang/javascript: conform to naming conventions; refactor tide config 2018-04-18 18:04:49 -04:00
8af94e8731 [*] Removes tern in favor of tide, adds node modules to path to execute things like flow, prettier, etc 2018-04-18 17:26:50 +00:00
726dea9880 lang/javascript: leave ecma strict warnings to flycheck 2018-03-06 18:38:35 -05:00
dc8fd12448 lang/javascript: remove highlight-indentation-mode
This mode, paired with js2-mode's constant parsing, cause unacceptable
slowdowns so I've disabled it by default.
2018-03-06 16:19:54 -05:00
6c4e048c23 General refactor & cleanup 2018-02-14 07:47:22 -05:00
c6199800e4 lang/javascript: fix localleader bindings breaking SPC in emacs mode 2018-02-12 01:43:26 -05:00
422c6d9c12 lang/javascript: js-chain-indent = t 2018-02-09 23:24:37 -05:00
42cee2e046 Update :jump => :lookup 2018-01-05 23:57:48 -05:00