mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
- Switch from highlight-indentation package to highlight-indent-guides. - Activate visual indentation in a prog-mode hook, rather than doing within each individual major mode. It was already done within all major modes based on prog-mode anyway. - Add new siren-display-indetation module and function as a central way to enable visual indetation guides. This makes switching the underlying package at some point in the future much easier.
50 lines
1.0 KiB
EmacsLisp
50 lines
1.0 KiB
EmacsLisp
;;; siren-web-mode.el --- jimeh's Emacs Siren: web-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for web-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-company)
|
|
(require 'siren-fci)
|
|
(require 'siren-folding)
|
|
|
|
(use-package web-mode
|
|
:mode
|
|
"\\.html\\'"
|
|
"\\.html.erb\\'"
|
|
"\\.tpl\\'"
|
|
|
|
:bind (:map web-mode-map
|
|
("C-j" . newline-and-indent)
|
|
("C-c C-h" . siren-toggle-hiding))
|
|
|
|
:hook
|
|
(web-mode . siren-web-mode-setup)
|
|
|
|
:custom
|
|
(web-mode-code-indent-offset 2)
|
|
(web-mode-css-indent-offset 2)
|
|
(web-mode-markup-indent-offset 2)
|
|
(web-mode-sql-indent-offset 2)
|
|
(web-mode-engines-alist '(("go" . "\\.tpl\\'")))
|
|
|
|
:init
|
|
(defun siren-web-mode-setup ()
|
|
"Default tweaks for `web-mode'."
|
|
(setq tab-width 2)
|
|
|
|
(company-mode +1)
|
|
(fci-mode -1)
|
|
(hideshowvis-enable)
|
|
(hs-minor-mode +1)
|
|
(subword-mode +1)))
|
|
|
|
(use-package web-beautify
|
|
:bind (:map web-mode-map
|
|
("C-c C-f" . web-beautify-html)))
|
|
|
|
(provide 'siren-web-mode)
|
|
;;; siren-web-mode.el ends here
|