mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
FStarLang/fstar-mode.el@6e5d3ea858 -> FStarLang/fstar-mode.el@36ffb46259 ProofGeneral/PG@d668946929 -> ProofGeneral/PG@e0ec3db200 Wilfred/helpful@4ba24cac9f -> Wilfred/helpful@5ad8a9ce57 agda/agda@3344ca8058 -> agda/agda@10a0ca0516 bastibe/org-journal@17b34ce8df -> bastibe/org-journal@115b9c0354 beancount/beancount-mode@452621fa1f -> beancount/beancount-mode@ddd4b87257 clojure-emacs/cider@f00e83d338 -> clojure-emacs/cider@a0d6169026 crystal-lang-tools/emacs-crystal-mode@ea89b108fa -> crystal-lang-tools/emacs-crystal-mode@d913fea6f0 emacs-ess/ESS@c72b911d70 -> emacs-ess/ESS@0eb240bcb6 emacs-geiser/geiser@74eed1669a -> emacs-geiser/geiser@c1c27072a4 emacs-lsp/lsp-haskell@6981f8d122 -> emacs-lsp/lsp-haskell@b2edf1a9f8 emacs-lsp/lsp-metals@6a6a345a8a -> emacs-lsp/lsp-metals@567089f7f4 emacs-rustic/rustic@e5c0271f1e -> emacs-rustic/rustic@fbbf0a7192 emacs-straight/auctex@f00256cbfd -> emacs-straight/auctex@53f80ba36c emacs-straight/org-mode@5a4686915e -> emacs-straight/org-mode@ff33d9ec2e emacs-typescript/typescript.el@dd10f702d4 -> emacs-typescript/typescript.el@481df3ad2c emacsorphanage/dart-mode@02e919c1cf -> emacsorphanage/dart-mode@88b6683f43 emacsorphanage/macrostep@44faf4f7bf -> emacsorphanage/macrostep@d0928626b4 erlang/otp@3e7f126fe4 -> erlang/otp@64185e73b0 fuxialexander/org-pdftools@4e420233a1 -> fuxialexander/org-pdftools@5613b7ae56 greghendershott/racket-mode@f2645aadd2 -> greghendershott/racket-mode@eef5e9ab2c hakimel/reveal.js@e15cf92ccd -> hakimel/reveal.js@2059d388f7 haskell/haskell-mode@1a285fc4c5 -> haskell/haskell-mode@7f452cc9e6 joaotavora/sly@742355f755 -> joaotavora/sly@c48defcf58 jorgenschaefer/emacs-buttercup@bf01a33f8b -> jorgenschaefer/emacs-buttercup@c467c659b2 jrblevin/markdown-mode@e100778594 -> jrblevin/markdown-mode@ee9d6de1d2 js-emacs/js2-refactor.el@a0977c4ce1 -> js-emacs/js2-refactor.el@e1177c728a kaushalmodi/ox-hugo@98421a1298 -> kaushalmodi/ox-hugo@e3365cb4e6 ljos/jq-mode@a0f79eba78 -> ljos/jq-mode@eeb86b4d5a magit/orgit@59d21fdb21 -> magit/orgit@3b6b34bd11 nonsequitur/inf-ruby@dad78a13f1 -> nonsequitur/inf-ruby@b8076aad10 ocaml/dune@098117d229 -> ocaml/dune@b74586e909 ocaml/merlin@3a806ef87f -> ocaml/merlin@92c3ba9473 oer/org-re-reveal@ab1422c163 -> oer/org-re-reveal@88e9d9e679 org-roam/org-roam@cad3518788 -> org-roam/org-roam@0037daaf3e purescript-emacs/purescript-mode@07e4d6ecfe -> purescript-emacs/purescript-mode@b076bafe94 pythonic-emacs/anaconda-mode@f900bd7656 -> pythonic-emacs/anaconda-mode@5c6eff4645 pythonic-emacs/company-anaconda@169252fca7 -> pythonic-emacs/company-anaconda@0f7984b3be pythonic-emacs/pyenv-mode@76787ea44f -> pythonic-emacs/pyenv-mode@f7d53796d6 seagle0128/grip-mode@df0ba7589d -> seagle0128/grip-mode@ffce7f78eb swift-emacs/swift-mode@ab189d6e89 -> swift-emacs/swift-mode@2c0b2b72dc technomancy/fennel-mode@3632cc77de -> technomancy/fennel-mode@4ccb6d5944 weijiangan/flycheck-golangci-lint@91c59b128a -> weijiangan/flycheck-golangci-lint@424ba1b3a1
:lang javascript
Description unfold
This module adds JavaScript and TypeScript support to Doom Emacs.
- Code completion (doom-package:tide)
- REPL support (doom-package:nodejs-repl)
- Refactoring commands (doom-package:js2-refactor)
- Syntax checking (doom-package:flycheck)
- Browser code injection with doom-package:skewer-mode
- Coffeescript & JSX support
- Jump-to-definitions and references support (doom-package:xref)
Maintainers
Module flags
- +lsp
-
Enable LSP support for
js2-mode
,rjsx-mode
, JS inweb-mode
, andtypescript-mode
. Requires doom-module::tools lsp and a langserver (supports ts-ls and deno-ls). - +tree-sitter
- Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter.
Packages
- doom-package:js2-refactor
- doom-package:nodejs-repl
- doom-package:npm-mode
- doom-package:rjsx-mode
- doom-package:skewer-mode (DEPRECATED)
- doom-package:tide
- doom-package:typescript-mode
- doom-package:xref-js2 if doom-module::tools lookup
TODO Hacks
This module's hacks haven't been documented yet. Document them?
TODO Changelog
This module does not have a changelog yet.
Installation
Enable this module in your doom!
block.
This module requires NodeJS and one of NPM or Yarn in your $PATH
.
- MacOS:
$ brew install node
- Arch Linux:
$ pacman --needed --noconfirm -S nodejs npm
- openSUSE:
$ zypper install nodejs npm
Formatter
Formatting is handled using the doom-module::editor format module via prettier.
TODO Usage
This module's usage documentation is incomplete. Complete it?
rjsx-mode
is used for all javascript buffers.
Commands
rjsx-mode
command | key / ex command | description |
---|---|---|
+javascript/open-repl |
:repl |
Open the NodeJS REPL (or send the current selection to it) |
+javascript/skewer-this-buffer |
<localleader> S | Attaches a browser to the current buffer |
Tide
command | key / ex command | description |
---|---|---|
tide-restart-server |
<localleader> R | Restart tide server |
tide-reformat |
<localleader> f | Reformat region |
tide-rename-symbol |
<localleader> r r s | Rename symbol at point |
tide-organize-imports |
<localleader> r o i | Organize imports |
Refactoring (js2-refactor-mode)
command | key / ex command | description |
---|---|---|
js2r-expand-node-at-point |
<localleader> r e e | Expand bracketed list according to node type at point |
js2r-contract-node-at-point |
<localleader> r c c | Contract bracketed list according to node type at point |
js2r-extract-function |
<localleader> r e f | Extracts the marked expressions out into a new named function. |
js2r-extract-method |
<localleader> r e m | Extracts the marked expressions out into a new named method in an object literal. |
js2r-toggle-function-expression-and-declaration |
<localleader> r t f | Toggle between function name() {} and var name = function (); |
js2r-toggle-arrow-function-and-expression |
<localleader> r t a | Toggle between function expression to arrow function. |
js2r-toggle-function-async |
<localleader> r t s | Toggle between an async and a regular function. |
js2r-introduce-parameter |
<localleader> r i p | Changes the marked expression to a parameter in a local function. |
js2r-localize-parameter |
<localleader> r l p | Changes a parameter to a local var in a local function. |
js2r-wrap-buffer-in-iife |
<localleader> r w i | Wraps the entire buffer in an immediately invoked function expression |
js2r-inject-global-in-iife |
<localleader> r i g | Creates a shortcut for a marked global by injecting it in the wrapping immediately invoked function expression |
js2r-add-to-globals-annotation |
<localleader> r a g | Creates a *global * annotation if it is missing, and adds the var at point to it. |
js2r-extract-var |
<localleader> r e v | Takes a marked expression and replaces it with a var. |
js2r-extract-let |
<localleader> r e l | Similar to extract-var but uses a let-statement. |
js2r-extract-const |
<localleader> r e c | Similar to extract-var but uses a const-statement. |
js2r-inline-var |
<localleader> r i v | Replaces all instances of a variable with its initial value. |
js2r-rename-var |
<localleader> r r v | Renames the variable on point and all occurrences in its lexical scope. |
js2r-var-to-this |
<localleader> r v t | Changes local var a to be this.a instead. |
js2r-arguments-to-object |
<localleader> r a o | Replaces arguments to a function call with an object literal of named arguments. |
js2r-ternary-to-if |
<localleader> r 3 i | Converts ternary operator to if-statement. |
js2r-split-var-declaration |
<localleader> r s v | Splits a var with multiple vars declared, into several var statements. |
js2r-split-string |
<localleader> r s s | Splits a string. |
js2r-string-to-template |
<localleader> r s t | Converts a string into a template string. |
js2r-unwrap |
<localleader> r u w | Replaces the parent statement with the selected region. |
js2r-log-this |
<localleader> r l t | Adds a console.log() statement for what is at point (or region). With a prefix argument, use JSON pretty-printing. |
js2r-debug-this |
<localleader> r d t | Adds a debug() statement for what is at point (or region). |
js2r-forward-slurp |
<localleader> r s l | Moves the next statement into current function, if-statement, for-loop or while-loop. |
js2r-forward-barf |
<localleader> r b a | Moves the last child out of current function, if-statement, for-loop or while-loop. |
js2r-kill |
<localleader> r k | Kills to the end of the line, but does not cross semantic boundaries. |
skewer-mode
general
command | key / ex command | description |
---|---|---|
skewer-eval-last-expression |
<localleader> s E | Evaluate last expression |
skewer-eval-defun |
<localleader> s e | Evaluate function definition at point |
skewer-load-buffer |
<localleader> s f | Load buffer into REPL |
css
command | key / ex command | description |
---|---|---|
skewer-css-eval-current-declaration |
<localleader> s e | Evaluate declaration at point |
skewer-css-eval-current-rule |
<localleader> s r | Evaluate rule at point |
skewer-css-eval-buffer |
<localleader> s b | Evaluate buffer |
skewer-css-clear-all |
<localleader> s c | Clear all rules |
html
command | key / ex command | description |
---|---|---|
skewer-html-eval-tag |
<localleader> s e | Evaluate tag at point |
npm-mode
command | key / ex command | description |
---|---|---|
npm-mode-npm-init |
<localleader> n n | Initialize npm project |
npm-mode-npm-install |
<localleader> n i | Install npm package |
npm-mode-npm-install-save |
<localleader> n s | Install npm package and save to package.json |
npm-mode-npm-install-save-dev |
<localleader> n d | Install npm package and save to package.json as a dev dependency |
npm-mode-npm-uninstall |
<localleader> n u | Uninstall npm package |
npm-mode-npm-list |
<localleader> n l | List npm packages |
npm-mode-npm-run |
<localleader> n r | Run npm task |
npm-mode-visit-project-file |
<localleader> n v | Find file in npm project |
TODO Configuration
This module has no configuration documentation yet. Write some?
Troubleshooting
There are no known problems with this module. Report one?
Frequently asked questions
This module has no FAQs yet. Ask one?
TODO Appendix
This module has no appendix yet. Write one?