43 lines
877 B
EmacsLisp
43 lines
877 B
EmacsLisp
;; -*- lexical-binding: t; -*-
|
|
|
|
;; node version manager
|
|
(use-package nvm
|
|
:straight (:host github :repo "rejeep/nvm.el")
|
|
:commands (nvm-use)
|
|
:autoload (nvm-use-for
|
|
nvm-use-for-buffer
|
|
nvm--installed-versions))
|
|
|
|
(use-package json-mode
|
|
:commands (json-mode)
|
|
:mode ("\\.json\\'")
|
|
:custom
|
|
(js-indent-level 2))
|
|
|
|
(use-package jq-mode
|
|
:commands (jq-interactively))
|
|
|
|
(use-package js
|
|
:straight (:type built-in)
|
|
:defer t
|
|
:custom
|
|
(js-indent-level 2))
|
|
|
|
(use-package js-comint
|
|
:commands (run-js)
|
|
:config
|
|
(js-do-use-nvm)
|
|
:general
|
|
(js-mode-map "C-c M-j" #'run-js
|
|
"C-x C-e" #'js-send-last-sexp
|
|
"C-c C-k" #'js-send-buffer
|
|
"C-c M-z" #'js-send-buffer-and-go))
|
|
|
|
(use-package typescript-mode
|
|
:mode ("\\.ts\\'"
|
|
"\\.mjs\\'")
|
|
:custom
|
|
(typescript-indent-level 2))
|
|
|
|
(provide 'init-js)
|