Files
doomemacs/modules/lang/javascript
Henrik Lissner b126c3857d bump: :lang
JuliaEditorSupport/julia-emacs@d360ad5285 -> JuliaEditorSupport/julia-emacs@2aca8cf585
ProofGeneral/PG@3a99da2755 -> ProofGeneral/PG@b30d65de80
abo-abo/org-download@19e166f0a8 -> abo-abo/org-download@c8be261178
agda/agda@4f82f9b90a -> agda/agda@819993172d
ananthakumaran/tide@b38dfc3f8f -> ananthakumaran/tide@6a35fe355f
babashka/neil@6728367eff -> babashka/neil@78ffab1868
beancount/beancount-mode@7b437abcf0 -> beancount/beancount-mode@452621fa1f
cdominik/cdlatex@33770dec73 -> cdominik/cdlatex@fac070f016
clojure-emacs/cider@8fdb53e8be -> clojure-emacs/cider@c228dec27d
davazp/graphql-mode@ef4aecaead -> davazp/graphql-mode@c3baca9280
diml/utop@384b3098c8 -> diml/utop@b490baca21
emacs-geiser/guile@5a856c2982 -> emacs-geiser/guile@a0f111f8de
emacs-geiser/mit@4e90e9ae81 -> emacs-geiser/mit@ddd2ba733e
emacs-jupyter/jupyter@f97f4b5d8c -> emacs-jupyter/jupyter@e966c5d3d6
emacs-lsp/lsp-dart@9ffbafb7dc -> emacs-lsp/lsp-dart@7e3d342941
emacs-lsp/lsp-haskell@ba49fa9822 -> emacs-lsp/lsp-haskell@6981f8d122
emacs-lsp/lsp-metals@0dc938be11 -> emacs-lsp/lsp-metals@b5139c9593
emacs-lsp/lsp-pyright@0c0d72aedd -> emacs-lsp/lsp-pyright@dd54b3ae7c
emacs-php/composer.el@791a7104be -> emacs-php/composer.el@6c7e19256f
emacs-php/php-mode@59814bd80c -> emacs-php/php-mode@31f702ee2d
emacs-rustic/rustic@d765680373 -> emacs-rustic/rustic@9fdf5c76b2
emacs-straight/auctex@08881d08ce -> emacs-straight/auctex@0de9730957
emacs-typescript/typescript.el@fc3a4f3b27 -> emacs-typescript/typescript.el@dd10f702d4
emacsmirror/org-contrib@ccd4212866 -> emacsmirror/org-contrib@f22bdd6a58
emacsmirror/paredit@037b9b8acb -> emacsmirror/paredit@af075775af
emacsorphanage/dart-mode@44beb628e5 -> emacsorphanage/dart-mode@02e919c1cf
emacsorphanage/macrostep@4939d88779 -> emacsorphanage/macrostep@419873665f
erlang/otp@c66bf53cde -> erlang/otp@094260aba7
flatwhatson/scheme-mode@51e586e5f1 -> flatwhatson/scheme-mode@a713b253d2
godotengine/emacs-gdscript-mode@32086df833 -> godotengine/emacs-gdscript-mode@bee7f99c6f
greghendershott/racket-mode@dba66c4536 -> greghendershott/racket-mode@c5bee6895b
hakimel/reveal.js@472535065c -> hakimel/reveal.js@0d02d8a303
haskell/haskell-mode@727f72a2a4 -> haskell/haskell-mode@1a285fc4c5
hniksic/emacs-htmlize@ed5e5b05fd -> hniksic/emacs-htmlize@8e3841c837
jimhourihan/glsl-mode@9b2e5f28e4 -> jimhourihan/glsl-mode@c5f2c2e7ed
jrblevin/markdown-mode@6102ac5b73 -> jrblevin/markdown-mode@b8637bae07
jwiegley/emacs-async@43f97d7e68 -> jwiegley/emacs-async@af47d6f930
kaushalmodi/ox-hugo@c4156d9d38 -> kaushalmodi/ox-hugo@98421a1298
ledger/ledger-mode@a6be7a2d79 -> ledger/ledger-mode@356d8049ed
necaris/conda.el@ce748a53f9 -> necaris/conda.el@05de0c8f0c
non-Jedi/eglot-jl@1d9cab6823 -> non-Jedi/eglot-jl@7c968cc61f
nonsequitur/inf-ruby@b234625c85 -> nonsequitur/inf-ruby@6399a36682
ocaml/dune@a7924e322e -> ocaml/dune@5ac095c7c0
ocaml/merlin@e016abfac6 -> ocaml/merlin@a36f42a5b1
org-noter/org-noter@6f292d7f1e -> org-noter/org-noter@691efc3ed4
org-roam/org-roam@0b9fcbc97b -> org-roam/org-roam@2a630476b3
purcell/flycheck-ledger@628e25ba66 -> purcell/flycheck-ledger@48bed9193c
purcell/flycheck-package@75efa098cf -> purcell/flycheck-package@a52e4e95f3
purcell/less-css-mode@c7fa3d56d8 -> purcell/less-css-mode@c78b88ff9a
purescript-emacs/purescript-mode@eacc61aaaf -> purescript-emacs/purescript-mode@d187b3d4bb
rust-lang/rust-mode@c87f6f82bd -> rust-lang/rust-mode@542f1755d8
seagle0128/grip-mode@9adac9c989 -> seagle0128/grip-mode@d6c7e33e40
senny/rbenv.el@588b817d51 -> senny/rbenv.el@4afe1dc6bd
swift-emacs/swift-mode@b06c97b909 -> swift-emacs/swift-mode@ab189d6e89
technomancy/fennel-mode@f4bd34e1c3 -> technomancy/fennel-mode@259470b297
tpapp/julia-repl@801d0fc3d8 -> tpapp/julia-repl@bb90cc1fce
wbolster/emacs-python-pytest@dcdaec6fe2 -> wbolster/emacs-python-pytest@25d9801562
yoshiki/yaml-mode@7b5ce294fb -> yoshiki/yaml-mode@d91f878729
ziglang/zig-mode@f55e42536a -> ziglang/zig-mode@f0b4a48753
2024-11-19 17:49:29 -05:00
..
2024-09-14 20:47:39 -04:00
2024-10-20 02:41:50 -04:00
2024-11-19 17:49:29 -05:00

:lang javascript

Description   unfold

This module adds JavaScript and TypeScript support to Doom Emacs.

Module flags

+lsp
Enable LSP support for js2-mode, rjsx-mode, JS in web-mode, and typescript-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.

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?