doomemacs/modules/lang/javascript
Henrik Lissner 6be2262423 Bump :lang
200ok-ch/counsel-jq@153d70b -> 200ok-ch/counsel-jq@8cadd2e
Andersbakken/rtags@63f18ac -> Andersbakken/rtags@65113e2
Groovy-Emacs-Modes/groovy-emacs-modes@26da902 -> Groovy-Emacs-Modes/groovy-emacs-modes@99eaf70
NixOS/nix-mode@0023fc5 -> NixOS/nix-mode@3cca5b6
ProofGeneral/PG@f0f0476 -> ProofGeneral/PG@bc86736
Raku/raku-mode@8a6e17f -> Raku/raku-mode@7496ad3
StanfordLegion/terra-mode@1e5e824 -> StanfordLegion/terra-mode@eab9e59
TheBB/company-reftex@291c283 -> TheBB/company-reftex@42eb98c
agda/agda@ecb9323 -> agda/agda@af9c4b9
ananthakumaran/tide@ad6fa78 -> ananthakumaran/tide@ccff099
asok/projectile-rails@f1fe6e8 -> asok/projectile-rails@6a18ada
beancount/beancount-mode@3c04745 -> beancount/beancount-mode@02fe03e
brotzeit/rustic@ed68fd3 -> brotzeit/rustic@6ca73bb
cdominik/cdlatex@adf96ba -> cdominik/cdlatex@614a8d9
clojure-emacs/clojure-mode@a14671e -> clojure-emacs/clojure-mode@3e426b3
cython/cython@9decfca -> cython/cython@fae33cf
dgutov/robe@126650a -> dgutov/robe@e1304d1
diml/utop@711c246 -> diml/utop@c87b8b2
dominikh/go-mode.el@49a5380 -> dominikh/go-mode.el@3497434
elixir-editors/emacs-elixir@0212b06 -> elixir-editors/emacs-elixir@6bbc1e5
emacs-csharp/csharp-mode@f977800 -> emacs-csharp/csharp-mode@093f0f2
emacs-ess/ESS@126d344 -> emacs-ess/ESS@4fefd0f
emacs-lsp/lsp-dart@f3b70ec -> emacs-lsp/lsp-dart@01d89d4
emacs-lsp/lsp-haskell@7efbef3 -> emacs-lsp/lsp-haskell@eb37ac4
emacs-lsp/lsp-java@9685334 -> emacs-lsp/lsp-java@b66a075
emacs-lsp/lsp-metals@51a89c1 -> emacs-lsp/lsp-metals@9f82ebe
emacs-lsp/lsp-pyright@65fb141 -> emacs-lsp/lsp-pyright@71a7976
emacs-lsp/lsp-sourcekit@aafa987 -> emacs-lsp/lsp-sourcekit@ae4aa87
emacs-php/php-mode@a2bca9b -> emacs-php/php-mode@cbf2723
emacs-php/phpactor.el@80788a8 -> emacs-php/phpactor.el@272217f
emacs-straight/auctex@1472d1d -> emacs-straight/auctex@ea410dc
erlang/otp@94c9738 -> erlang/otp@645ea81
ethereum/emacs-solidity@b4fd719 -> ethereum/emacs-solidity@5f6ef31
factor/factor@5bfeab6 -> factor/factor@b989a86
fsharp/emacs-fsharp-mode@78898a1 -> fsharp/emacs-fsharp-mode@93b1fbc
godotengine/emacs-gdscript-mode@16c631c -> godotengine/emacs-gdscript-mode@b7bfa6a
greghendershott/racket-mode@5115c47 -> greghendershott/racket-mode@7f12cb1
haskell/haskell-mode@1baa12a -> haskell/haskell-mode@98ba392
hhvm/hack-mode@847fd91 -> hhvm/hack-mode@f9315be
hlissner/emacs-pug-mode@685fd34 -> hlissner/emacs-pug-mode@d080904
hvesalai/emacs-sbt-mode@0bdc36b -> hvesalai/emacs-sbt-mode@e29464a
idris-hackers/idris-mode@80aabd2 -> idris-hackers/idris-mode@f52ad0b
immerrr/lua-mode@2d9a468 -> immerrr/lua-mode@2bd9077
iyefrat/evil-tex@5f0d6fb -> iyefrat/evil-tex@87445d4
jcollard/elm-mode@e9fcf9c -> jcollard/elm-mode@f2e2d00
joaotavora/sly@5966d68 -> joaotavora/sly@41f4d65
jorgenschaefer/pyvenv@9b3678b -> jorgenschaefer/pyvenv@045ff94
jrblevin/markdown-mode@ac9ea26 -> jrblevin/markdown-mode@359347b
jwiegley/emacs-async@d7e7f79 -> jwiegley/emacs-async@9a8cd0c
jyp/attrap@778382e -> jyp/attrap@a5bc695
leanprover/lean-mode@5c50338 -> leanprover/lean-mode@bf32bb9
ledger/ledger-mode@32fef09 -> ledger/ledger-mode@19b84dc
nathankot/company-sourcekit@abf9bc5 -> nathankot/company-sourcekit@a1860ad
necaris/conda.el@dce431b -> necaris/conda.el@6db0720
non-Jedi/eglot-jl@84cff9d -> non-Jedi/eglot-jl@49f170e
nonsequitur/inf-ruby@c6990a6 -> nonsequitur/inf-ruby@03dd9c9
ocaml-ppx/ocamlformat@0ad8d0a -> ocaml-ppx/ocamlformat@5dd6574
ocaml/dune@65e04ba -> ocaml/dune@75ecfe3
ocaml/merlin@635923d -> ocaml/merlin@5731826
ocaml/tuareg@37a6730 -> ocaml/tuareg@b59c422
pashky/restclient.el@abc307b -> pashky/restclient.el@2cc1fd3
polymode/polymode@b3871e9 -> polymode/polymode@7d1f822
pythonic-emacs/anaconda-mode@344727c -> pythonic-emacs/anaconda-mode@4f367c7
seagle0128/grip-mode@2855205 -> seagle0128/grip-mode@c0ca789
sebasmonia/sharper@d610b83 -> sebasmonia/sharper@08277b6
swift-emacs/swift-mode@ad12a30 -> swift-emacs/swift-mode@1b47a09
technomancy/fennel-mode@ba14a7d -> technomancy/fennel-mode@a908db8
tpapp/julia-repl@7ce38a9 -> tpapp/julia-repl@79e686e
ziglang/zig-mode@2d0eb23 -> ziglang/zig-mode@0babe7e

Closes #5221
2021-07-11 17:52:08 -04:00
..
autoload.el Guard skewer-*-mode checks in bound-and-true-p #3252 2020-05-31 22:34:42 -04:00
config.el Fix 'typescript-tide is not a valid syntax checker' error 2021-05-26 17:04:06 -04:00
doctor.el Add :tools lsp checks for +lsp flag 2019-04-24 18:16:05 -04:00
packages.el Bump :lang 2021-07-11 17:52:08 -04:00
README.org Remove eslintd-fix package 2020-04-23 23:56:17 -04:00

lang/javascript

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