mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
200ok-ch/counsel-jq@f5bfed8 -> 200ok-ch/counsel-jq@153d70b Andersbakken/rtags@63a7d9b -> Andersbakken/rtags@aa4c827 MatthewFluet/company-mlton@b87e363 -> MatthewFluet/company-mlton@9b09d20 NixOS/nix-mode@e32c6bf -> NixOS/nix-mode@0023fc5 OmniSharp/omnisharp-emacs@e26ff8b -> OmniSharp/omnisharp-emacs@8ec5929 ProofGeneral/PG@702f5b9 -> ProofGeneral/PG@bdb6782 Wilfred/elisp-def@da1f763 -> Wilfred/elisp-def@dfca043 agda/agda@5070bd8 -> agda/agda@9d08edb ananthakumaran/exunit.el@c77b039 -> ananthakumaran/exunit.el@5bb115f ananthakumaran/tide@a43a37b -> ananthakumaran/tide@7f7334b asok/projectile-rails@7a256b1 -> asok/projectile-rails@8d6b373 brotzeit/rustic@f7d5ac0 -> brotzeit/rustic@61d600e clojure-emacs/cider@1a34f89 -> clojure-emacs/cider@815204f clojure-emacs/clj-refactor.el@9dcc50d -> clojure-emacs/clj-refactor.el@b24ce76 clojure-emacs/clojure-mode@53ef8ac -> clojure-emacs/clojure-mode@f26379b crystal-lang-tools/emacs-crystal-mode@f9e4db1 -> crystal-lang-tools/emacs-crystal-mode@1599814 cython/cython@17e03b8 -> cython/cython@9a761a6 dgutov/robe@f04dcc7 -> dgutov/robe@3ef165c diml/utop@7bc5117) -> diml/utop@a5ff52b) dominikh/go-mode.el@fdf46fe -> dominikh/go-mode.el@49a5380 elixir-editors/emacs-elixir@b78e7f7 -> elixir-editors/emacs-elixir@9de08c1 emacs-csharp/csharp-mode@4916829 -> emacs-csharp/csharp-mode@09b4d57 emacs-ess/ESS@d013616 -> emacs-ess/ESS@5169b0d emacs-lsp/lsp-dart@b81b1ec -> emacs-lsp/lsp-dart@71902ca emacs-lsp/lsp-haskell@4d85cb3 -> emacs-lsp/lsp-haskell@7efbef3 emacs-lsp/lsp-java@f43b00a -> emacs-lsp/lsp-java@5f6d357 emacs-lsp/lsp-metals@31dafff -> emacs-lsp/lsp-metals@c76eeb6 emacs-lsp/lsp-pyright@71ff088 -> emacs-lsp/lsp-pyright@65fb141 emacs-lsp/lsp-python-ms@5470ada -> emacs-lsp/lsp-python-ms@689f6cf emacs-lsp/lsp-sourcekit@948c3a3 -> emacs-lsp/lsp-sourcekit@ff204ed emacs-php/php-mode@7e5722c -> emacs-php/php-mode@8cdc727 emacs-straight/auctex@fb062a3 -> emacs-straight/auctex@384c4b9 emacs-straight/csv-mode@eb3ec00 -> emacs-straight/csv-mode@8da54e8 emacs-straight/org-mode@9e98e9a -> emacs-straight/org-mode@0b117f7 emacs-typescript/typescript.el@54f14c4 -> emacs-typescript/typescript.el@1043025 emacsmirror/cmake-mode@e58c411 -> emacsmirror/cmake-mode@d5d77de ericdallo/hover.el@3f07a18 -> ericdallo/hover.el@c9c0593 erlang/otp@8fc0641 -> erlang/otp@af06b43 eschulte/jump.el@e4f1372 -> eschulte/jump.el@55caa66 ethereum/emacs-solidity@d166a86 -> ethereum/emacs-solidity@b4fd719 factor/factor@94a922a -> factor/factor@1928e60 fsharp/emacs-fsharp-mode@13fbf4c -> fsharp/emacs-fsharp-mode@78898a1 fxbois/web-mode@890e837 -> fxbois/web-mode@8ef4793 godotengine/emacs-gdscript-mode@75fe658 -> godotengine/emacs-gdscript-mode@16c631c greghendershott/racket-mode@3563081 -> greghendershott/racket-mode@75ea8f6 haskell/haskell-mode@0d39c84 -> haskell/haskell-mode@3a019e6 hhvm/hack-mode@9079bc3) -> hhvm/hack-mode@847fd91) hvesalai/emacs-scala-mode@9d3b56e -> hvesalai/emacs-scala-mode@402d6df idris-hackers/idris-mode@b77eadd -> idris-hackers/idris-mode@80aabd2 immerrr/lua-mode@d2ff304 -> immerrr/lua-mode@2d9a468 iyefrat/evil-tex@ac313ef -> iyefrat/evil-tex@5f0d6fb jaor/geiser@cd00be6 -> jaor/geiser@26dd2f4 jcollard/elm-mode@363da4b -> jcollard/elm-mode@188b9c7 joaotavora/sly@3278819 -> joaotavora/sly@fb84318 jorgenschaefer/emacs-buttercup@2f24a44 -> jorgenschaefer/emacs-buttercup@1de6be4 jrblevin/markdown-mode@dcad557 -> jrblevin/markdown-mode@0517340 jwiegley/emacs-async@14f48de -> jwiegley/emacs-async@d7e7f79 jyp/attrap@9c88154 -> jyp/attrap@778382e jyp/dante@e2acbf6 -> jyp/dante@7b1ab64 kaushalmodi/ox-hugo@04f41ca -> kaushalmodi/ox-hugo@a05667e leanprover/lean-mode@cc1f5fa -> leanprover/lean-mode@15bee87 ledger/ledger-mode@805507f -> ledger/ledger-mode@3495d12 mooz/js2-mode@f7816bd -> mooz/js2-mode@29979e5 nonsequitur/inf-ruby@b012457 -> nonsequitur/inf-ruby@1fc972e ocaml-ppx/ocamlformat@860266b -> ocaml-ppx/ocamlformat@7db8d13 ocaml/dune@4d097cd -> ocaml/dune@f839fc1 ocaml/merlin@28193d5 -> ocaml/merlin@36d0aef pezra/rspec-mode@f1029ca -> pezra/rspec-mode@92ef785 polymode/poly-R@51ffeb6 -> polymode/poly-R@c42ff3a polymode/polymode@3284ff1 -> polymode/polymode@b3871e9 purescript-emacs/psc-ide-emacs@663f4e2 -> purescript-emacs/psc-ide-emacs@ce97d71 purescript-emacs/purescript-mode@154ad16 -> purescript-emacs/purescript-mode@8410baf pwalsh/pipenv.el@f516a1a -> pwalsh/pipenv.el@8f50c68 pythonic-emacs/anaconda-mode@b1875a5 -> pythonic-emacs/anaconda-mode@081f9d8 racer-rust/emacs-racer@a0bdf77 -> racer-rust/emacs-racer@f17f9d7 rubocop-hq/rubocop-emacs@03bf155 -> rubocop-hq/rubocop-emacs@1372ee3 seagle0128/grip-mode@91da46f -> seagle0128/grip-mode@1aebf9c senny/rvm.el@b2498a4 -> senny/rvm.el@c1f2642 swift-emacs/swift-mode@0bc8d8d -> swift-emacs/swift-mode@95ff004 takaxp/org-tree-slide@04b5a9d -> takaxp/org-tree-slide@c9487e5 technomancy/fennel-mode@fa56106 -> technomancy/fennel-mode@bebc9dd tpapp/julia-repl@d073acb -> tpapp/julia-repl@7ce38a9 wbolster/emacs-python-pytest@3fadf1f -> wbolster/emacs-python-pytest@31ae5e0 wwwjfy/emacs-fish@db257db -> wwwjfy/emacs-fish@a7c953b Fix #4695 Close #4529 Close #4576
lang/javascript
Table of Contents TOC
Description
This module adds JavaScript and TypeScript support.
- Code completion (tide)
- REPL support (nodejs-repl)
- Refactoring commands (js2-refactor)
- Syntax checking (flycheck)
- Browser code injection with skewer-mode
- Coffeescript & JSX support
- Jump-to-definitions and references support (xref)
Module Flags
+lsp
Enables LangServer support for this module. You must have:tools lsp
enabled for this to work, as well as the langserver (e.g. typescript-language-server) installed on your system.
Prerequisites
Many of this modules' plugins require node
and either npm
or yarn
installed.
MacOS
brew install node
Arch Linux
sudo pacman --needed --noconfirm -S nodejs npm
openSUSE
sudo zypper install nodejs npm
Troubleshooting
tide-sort-completions-by-kind
isn't respected
The :completion company
module uses company-prescient
to sort completion by
frecency, which overrules specialized sorting provided by some company backends
(like company-tide
).
Appendix
Commands
JS2-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 |
SPC m S |
Attaches a browser to the current buffer |
Tide
command | key / ex command | description |
---|---|---|
tide-restart-server |
SPC m R |
Restart tide server |
tide-reformat |
SPC m f |
Reformat region |
tide-rename-symbol |
SPC m r s |
Rename symbol at point |
tide-organize-imports |
SPC m r o i |
Organize imports |
Refactoring (js2-refactor-mode)
command | key / ex command | description |
---|---|---|
js2r-expand-node-at-point |
SPC m r e e |
Expand bracketed list according to node type at point |
js2r-contract-node-at-point |
SPC m r c c |
Contract bracketed list according to node type at point |
js2r-extract-function |
SPC m r e f |
Extracts the marked expressions out into a new named function. |
js2r-extract-method |
SPC m r e m |
Extracts the marked expressions out into a new named method in an object literal. |
js2r-toggle-function-expression-and-declaration |
SPC m r t f |
Toggle between function name() {} and var name = function (); |
js2r-toggle-arrow-function-and-expression |
SPC m r t a |
Toggle between function expression to arrow function. |
js2r-toggle-function-async |
SPC m r t s |
Toggle between an async and a regular function. |
js2r-introduce-parameter |
SPC m r i p |
Changes the marked expression to a parameter in a local function. |
js2r-localize-parameter |
SPC m r l p |
Changes a parameter to a local var in a local function. |
js2r-wrap-buffer-in-iife |
SPC m r w i |
Wraps the entire buffer in an immediately invoked function expression |
js2r-inject-global-in-iife |
SPC m 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 |
SPC m r a g |
Creates a *global * annotation if it is missing, and adds the var at point to it. |
js2r-extract-var |
SPC m r e v |
Takes a marked expression and replaces it with a var. |
js2r-extract-let |
SPC m r e l |
Similar to extract-var but uses a let-statement. |
js2r-extract-const |
SPC m r e c |
Similar to extract-var but uses a const-statement. |
js2r-inline-var |
SPC m r i v |
Replaces all instances of a variable with its initial value. |
js2r-rename-var |
SPC m r r v |
Renames the variable on point and all occurrences in its lexical scope. |
js2r-var-to-this |
SPC m r v t |
Changes local var a to be this.a instead. |
js2r-arguments-to-object |
SPC m r a o |
Replaces arguments to a function call with an object literal of named arguments. |
js2r-ternary-to-if |
SPC m r 3 i |
Converts ternary operator to if-statement. |
js2r-split-var-declaration |
SPC m r s v |
Splits a var with multiple vars declared, into several var statements. |
js2r-split-string |
SPC m r s s |
Splits a string. |
js2r-string-to-template |
SPC m r s t |
Converts a string into a template string. |
js2r-unwrap |
SPC m r u w |
Replaces the parent statement with the selected region. |
js2r-log-this |
SPC m 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 |
SPC m r d t |
Adds a debug() statement for what is at point (or region). |
js2r-forward-slurp |
SPC m r s l |
Moves the next statement into current function, if-statement, for-loop or while-loop. |
js2r-forward-barf |
SPC m r b a |
Moves the last child out of current function, if-statement, for-loop or while-loop. |
js2r-kill |
SPC m 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 |
SPC m s E |
Evaluate last expression |
skewer-eval-defun |
SPC m s e |
Evaluate function definition at point |
skewer-load-buffer |
SPC m s f |
Load buffer into REPL |
css
command | key / ex command | description |
---|---|---|
skewer-css-eval-current-declaration |
SPC m s e |
Evaluate declaration at point |
skewer-css-eval-current-rule |
SPC m s r |
Evaluate rule at point |
skewer-css-eval-buffer |
SPC m s b |
Evaluate buffer |
skewer-css-clear-all |
SPC m s c |
Clear all rules |
html
command | key / ex command | description |
---|---|---|
skewer-html-eval-tag |
SPC m s e |
Evaluate tag at point |
npm-mode
command | key / ex command | description |
---|---|---|
npm-mode-npm-init |
SPC m n n |
Initialize npm project |
npm-mode-npm-install |
SPC m n i |
Install npm package |
npm-mode-npm-install-save |
SPC m n s |
Install npm package and save to package.json |
npm-mode-npm-install-save-dev |
SPC m n d |
Install npm package and save to package.json as a dev dependency |
npm-mode-npm-uninstall |
SPC m n u |
Uninstall npm package |
npm-mode-npm-list |
SPC m n l |
List npm packages |
npm-mode-npm-run |
SPC m n r |
Run npm task |
npm-mode-visit-project-file |
SPC m n v |
Find file in npm project |