diff options
Diffstat (limited to 'lisp/languages/javascript.el')
| -rw-r--r-- | lisp/languages/javascript.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/languages/javascript.el b/lisp/languages/javascript.el new file mode 100644 index 0000000..4ade3ff --- /dev/null +++ b/lisp/languages/javascript.el @@ -0,0 +1,23 @@ +;;; javascript.el -*- lexical-binding: t; -*- +;;; +;;; Author: Jakob L. Kreuze <zerodaysfordays@sdf.org> +;;; URL: https://git.sr.ht/~jakob/.emacs.d/ + + +(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)) |