Add tree-sitter-hl-mode, update settings for JS/TS modes

This commit is contained in:
Andrew Scott 2022-05-02 12:05:43 -04:00
parent df4128e913
commit 90f8b6547e
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -311,6 +311,14 @@
:init
(apheleia-global-mode +1))
(use-package tree-sitter
:config
(global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
(use-package tree-sitter-langs
:after tree-sitter)
;; C/C++
;(setq-default c-default-style "k&r")
@ -338,12 +346,13 @@
:config
(add-to-list 'interpreter-mode-alist '("#!/usr/bin/env node" . js2-mode))
(setq js2-mode-show-strict-warnings nil)
:hook ('js-mode-hook 'js2-minor-mode))
:hook (js-mode . js2-minor-mode))
(use-package typescript-mode
:config
(setq typescript-indent-level 2)
:mode ("\\.ts\\'" . typescript-mode))
:mode ("\\.ts\\'" . typescript-mode)
("\\.tsx\\'" . typescript-mode))
(use-package restclient
:init
@ -355,18 +364,20 @@
(typescript-mode . rainbow-mode)
(web-mode . rainbow-mode)))
;(use-package skewer-mode
; :init
; (setq httpd-port 8123)
; :hook
; (('js-mode-hook 'skewer-mode)
; ('css-mode-hook 'skewer-css-mode)
; ('html-mode-hook 'skewer-html-mode)))
;; (use-package skewer-mode
;; :init
;; (setq httpd-port 8080)
;; :hook
;; (('js-mode-hook 'skewer-mode)
;; ('css-mode-hook 'skewer-css-mode)
;; ('html-mode-hook 'skewer-html-mode)))
;(use-package skewer-reload-stylesheets
; :hook
; (('css-mode-hook 'skewer-reload-stylesheets-start-editing)
; ('scss-mode-hook 'skewer-reload-stylesheets-start-editing)))
;; (use-package skewer-reload-stylesheets
;; :hook
;; (('css-mode-hook 'skewer-reload-stylesheets-start-editing)
;; ('scss-mode-hook 'skewer-reload-stylesheets-start-editing)))
;; (use-package simple-httpd)
(use-package web-mode
:config
@ -385,12 +396,8 @@
("\\.html?\\'" . web-mode)))
(use-package jsdoc
:straight (jsdoc :type git :host github :repo "isamert/jsdoc.el"))
; required for jsdoc
(use-package tree-sitter
:hook (js-mode . tree-sitter-mode))
(use-package tree-sitter-langs)
:straight (jsdoc :type git :host github :repo "isamert/jsdoc.el")
:bind ("C-c C-n" . jsdoc))
;; LaTeX