summaryrefslogtreecommitdiff
path: root/lisp/programming/javascript.el
diff options
context:
space:
mode:
authorJakob L. Kreuze2020-06-01 16:53:50 -0400
committerJakob L. Kreuze2020-06-01 16:53:50 -0400
commit6c7f0b8ae2de30a808901b16b0d462fe833ea1b4 (patch)
tree2cc0a3e9022fc43c39e5b91f4e7832b5387636e9 /lisp/programming/javascript.el
parent4d4f759881e310818055c31f286158da9db60d1c (diff)
Break config into files.
Diffstat (limited to 'lisp/programming/javascript.el')
-rw-r--r--lisp/programming/javascript.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/lisp/programming/javascript.el b/lisp/programming/javascript.el
new file mode 100644
index 0000000..c74e6ac
--- /dev/null
+++ b/lisp/programming/javascript.el
@@ -0,0 +1,26 @@
+;;; javascript.el -*- lexical-binding: t; -*-
+;;;
+;;; Author: Jakob L. Kreuze <zerodaysfordays@sdf.org>
+;;; URL: https://git.sr.ht/~jakob/.emacs.d/
+;;;
+;;; Configuration of a development environment for the Javascript programming
+;;; language.
+;;;
+
+(use-package js
+ :straight nil
+
+ ;; Set up `js-mode' to interact with a LSP daemon.
+ :requires lsp-mode
+ :hook (js-mode . lsp)
+ :config
+ (lsp-register-client
+ (make-lsp-client :new-connection (lsp-stdio-connection "~/.bin/js-ts-stdio")
+ :major-modes '(js-mode)
+ :server-id 'js-ts-stdio))
+
+;; I have yet to find a style guide I agree with, but one thing common to most
+;; of them that I _do_ agree with is that Javascript is far more readable with
+;; an indentation width of 2.
+ :init
+ (setq-default js-indent-level 2))

© 2015 - 2026 Jakob L. Kreuze