Remove vterm, add projectile & addtl packages for js/ts/html/css

This commit is contained in:
Andrew Scott 2022-03-28 15:42:30 -04:00
parent ab413f9252
commit d31b783559
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -217,12 +217,24 @@
(lsp-treemacs-sync-mode 1))
;; Git
(use-package magit
:bind ("C-M-;" . magit-status)
:commands (magit-status magit-get-current-branch)
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
;; Project management
(use-package projectile
:init
(projectile-mode +1)
:bind-keymap
(("C-M-p" . projectile-find-file)
("C-c p" . projectile-command-map))
:bind (:map projectile-mode-map
("C-c p" . projectile-command-map)))
;; LSP & debugging
(use-package lsp-mode
@ -295,14 +307,12 @@
("C-n" . company-select-next)
("C-p" . company-select-previous)))
;; Full terminal applications within Emacs
(use-package vterm
:commands vterm
:config
(setq vterm-max-scrollback 10000))
;;; Languages
(use-package apheleia
:init
(apheleia-global-mode +1))
;; C/C++
(setq-default c-default-style "k&r")
@ -320,20 +330,62 @@
;(use-package lsp-java)
;; JavaScript/TypeScript
;; JavaScript/TypeScript, HTML, CSS
(setq css-indent-level 2)
(setq css-indent-offset 2)
(setq js-indent-level 2)
(use-package typescript-mode
:config
(setq typescript-indent-level 2))
(use-package js2-mode
: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))
(use-package typescript-mode
:config
(setq typescript-indent-level 2)
:mode ("\\.ts\\'" . typescript-mode))
(use-package restclient
:init
(use-package company-restclient))
(use-package rainbow-mode
:hook
((js-mode . rainbow-mode)
(typescript-mode . rainbow-mode)
(web-mode . rainbow-mode)))
(use-package skewer-mode
:init
(setq httpd-port 8123)
:hook
(('js2-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 web-mode
:config
(setq web-mode-code-indent-offset 2)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-attribute-indent-offset 2)
:mode
(("\\.phtml\\'" . web-mode)
("\\.tpl\\.php\\'" . web-mode)
("\\.jsp\\'" . web-mode)
("\\.as[cp]x\\'" . web-mode)
("\\.erb\\'" . web-mode)
("\\.mustache\\'" . web-mode)
("\\.djhtml\\'" . web-mode)
("\\.jst.ejs\\'" . web-mode)
("\\.html?\\'" . web-mode)))
;; LaTeX
(use-package lsp-latex)