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.
36 lines
767 B
EmacsLisp
36 lines
767 B
EmacsLisp
;;; siren-json.el --- jimeh's Emacs Siren: json-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for json-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-eslintd-fix)
|
|
(require 'siren-folding)
|
|
|
|
(use-package json-mode
|
|
:mode "\\.json\\'"
|
|
:requires (flycheck highlight-indentation hideshowvis)
|
|
|
|
:bind (:map json-mode-map
|
|
("C-j" . newline-and-indent)
|
|
("C-c C-h" . siren-toggle-hiding))
|
|
|
|
:hook
|
|
(json-mode . siren-json-mode-setup)
|
|
|
|
:init
|
|
(defun siren-json-mode-setup ()
|
|
"Default tweaks for `json-mode'."
|
|
|
|
(let ((width 2))
|
|
(setq js-indent-level width
|
|
json-reformat:indent-width width
|
|
tab-width width))
|
|
|
|
(setq flycheck-checker 'json-jsonlint)))
|
|
|
|
(provide 'siren-json)
|
|
;;; siren-js.el ends here
|