blob: 4ade3fffc6f7755bcbfb949f5e109e618d6439b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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))
|
© 2015 - 2026 Jakob L. Kreuze