#+title:    :lang javascript
#+subtitle: all(hope(abandon(ye(who(enter(here))))))
#+created:  January 16, 2017
#+since:    1.3

* Description :unfold:
This module adds [[https://www.javascript.com/][JavaScript]] and [[https://www.typescriptlang.org/][TypeScript]] support to Doom Emacs.

- JSX/TSX support (requires [[doom-module:+tree-sitter]] and Emacs 29.1+)
- LSP Integration
  - Code completion (with [[doom-module::completion corfu]] (recommended) or
    [[doom-module::completion company]])
  - Syntax checking (with [[doom-module::checkers syntax]])
  - Jump-to-definitions and references support
- Code formatting (with [[doom-module::editor format]] and [[https://prettier.io/docs/en/install.html][prettier]])
- REPL support (with [[doom-package:nodejs-repl]] and/or [[doom-module::tools eval]])

** Maintainers
- [[doom-user:][@elken]]
- [[doom-user:][@hlissner]]
- [[doom-user:][@iyefrat]]

[[doom-contrib-maintainer:][Become a maintainer?]]

** Module flags
- +lsp ::
  Enable LSP support for ~js-mode~, ~js-ts-mode~, ~typesript-mode~, and
  ~typescript-ts-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]]. Requires Emacs 29.1+.
  Required for JSX/TSX support.

** Packages
- [[doom-package:nodejs-repl]]
- [[doom-package:typescript-mode]] unless [[doom-module:+tree-sitter]]

** TODO Hacks
#+begin_quote
 󱌣 This module's hacks haven't been documented yet. [[doom-contrib-module:][Document them?]]
#+end_quote

** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./

* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]

This module requires [[https://nodejs.org/en/][NodeJS]] and one of [[https://www.npmjs.com/][NPM]] or [[https://yarnpkg.com/][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 [[https://prettier.io/docs/en/install.html][prettier]].

* TODO Usage
#+begin_quote
 󱌣 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* TODO Configuration
#+begin_quote
 󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote

* Troubleshooting
/There are no known problems with this module./ [[doom-report:][Report one?]]

* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]

* TODO Appendix
#+begin_quote
 󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
