Commit Graph

156 Commits

Author SHA1 Message Date
d87fba7944 lang/javascript: remove screeps
Moved it to my private config. This is more of a customization than
something this module should offer support for.
2018-12-28 23:54:23 -05:00
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
29f119ad4d Hook +javascript-npm-mode into typescript-mode
This way typescript projects will be aware of node_modules.
2018-12-23 16:01:37 -05:00
63a5c4239a lang/javascript: update tide project resolution
To match projectile changes upstream. Fixes an error when opening an
arbitrary JS file in a non-project root.
2018-10-15 00:50:39 -04:00
8f2fd970e6 lang/js: add .mjs to auto-mode-alist regex 2018-10-03 18:08:28 -05:00
f115e4a883 lang/javascript: fix hijacked SPC in insert mode #876 2018-09-09 23:15:55 -04:00
5c96b0a801 lang/javascript: update set-docsets! 2018-09-09 09:58:21 -04:00
2019aaff97 lang/javascript: enable xref support in rjsx-mode 2018-09-09 09:58:21 -04:00
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
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
84abac6b69 Remove def-menu!; use :localleader keys instead
def-menu was clumsy. We could use a better UI for refactoring commands,
but they should be available via localleader keybinds in any case.
2018-09-09 09:58:18 -04:00
10b22b9750 Merge rjsx-mode pretty-symbols with pre-existing 2018-09-03 23:56:25 +02:00
37b920f461 adds common js pretty symbols for rjsx-mode 2018-09-03 16:38:11 +02:00
3a23ff56cd General formatting & minor refactors 2018-09-02 17:20:19 +02:00
a188ba9a1e adds npm-mode for javascript module 2018-09-01 01:48:15 +02:00
a1a66f5445 lang/javascript: improve project file detection
+javascript-npm-mode now uses a better search for package.json, making
extra sure that your local node_modules folder is added to exec-path.
2018-08-31 02:53:50 +02:00
0cf9d1f2f2 Minor refactor & revision across the board 2018-08-31 02:53:50 +02:00
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
48948f725f Enable +javascript-npm-mode in rjsx-mode too 2018-08-29 17:17:01 +02:00
c514ad200a Remove web-beautify from javascript & web modules
Superceded by :editor format module, which uses prettier.
2018-08-25 00:06:13 +02:00
6a39b98f67 Trigger +javascript-npm-mode in json-mode too 2018-08-24 16:56:24 +02:00
ecb01dbdfc lang/javascript: attempt more fontification 2018-08-22 02:20:25 +02:00
391ac1cae5 Leverage cache in tide-project-root advise 2018-08-13 21:47:56 +02:00
12c5490a39 Add node_modules/.bin to exec-path regardless #798
Before, this was conditional to the directory's existence. Add it
anyway, in case the folder is created while the buffer is open.

This may cause a problem is the project root changes while the buffer is
open, but for that case there's M-x doom/reload-project.
2018-08-11 01:59:38 +02:00
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
ffabd2687b lang/javascript: refactor & document +javascript/cleanup-tide-processes 2018-05-09 12:49:09 +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