summaryrefslogtreecommitdiffstats
path: root/lisp/init-javascript.el
blob: 4d18a70e3e13b304faa63a4312b3d359eb1b44a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(use-package js
  :ensure nil ;; package is bundled with emacs

  :init
  ;; set indent level to 2
  (setq-default js-indent-level 2)

  :mode
  ;; use js-mode for json and jshint
  ("\\.\\(json\\|jshintrc\\)\\'" . js-mode)

  :bind (:map js-mode-map
              ;; C-c p runs formats json with jq
              ("C-c p" . json-pretty-print-buffer)))

(provide 'init-javascript)