mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
All siren modules lazy-load if they can, so there's no need to lazy-require a siren module. Also this avoids the annoyance of the first time you use a feature it triggers a package install from melpa. All such things should happen as part of Emacs startup.
42 lines
987 B
EmacsLisp
42 lines
987 B
EmacsLisp
;;; siren-web-mode.el --- jimeh's Emacs Siren: web-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for web-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-programming)
|
|
|
|
(use-package web-mode
|
|
:mode
|
|
"\\.html\\'"
|
|
"\\.html.erb\\'"
|
|
|
|
:config
|
|
(setq web-mode-code-indent-offset 2
|
|
web-mode-css-indent-offset 2
|
|
web-mode-markup-indent-offset 2
|
|
web-mode-sql-indent-offset 2)
|
|
|
|
(defun siren-web-mode-mode-hook ()
|
|
"Default tweaks for `web-mode'."
|
|
(setq tab-width 2)
|
|
|
|
(siren-prog-mode-defaults)
|
|
(company-mode +1)
|
|
(fci-mode -1)
|
|
(hideshowvis-enable)
|
|
(hs-minor-mode +1)
|
|
(highlight-indentation-current-column-mode)
|
|
(highlight-indentation-set-offset 2)
|
|
(subword-mode +1)
|
|
(let ((map web-mode-map))
|
|
(define-key map (kbd "C-j") 'newline-and-indent)
|
|
(define-key map (kbd "C-c C-h") 'siren-toggle-hiding)))
|
|
|
|
(add-hook 'web-mode-hook 'siren-web-mode-mode-hook))
|
|
|
|
(provide 'siren-web-mode)
|
|
;;; siren-web-mode.el ends here
|