Set indentation for json-mode. Require ag.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 19 Feb 2017 13:33:21 +0200
changeset 1482 d74af7d75f19
parent 1481 31b541b9ce3e
child 1483 a25f209ebf15
Set indentation for json-mode. Require ag.
.emacs-my
--- a/.emacs-my	Wed Feb 15 00:01:59 2017 +0200
+++ b/.emacs-my	Sun Feb 19 13:33:21 2017 +0200
@@ -824,6 +824,8 @@
       (let ((current-prefix-arg nil)) (ag str default-directory))
     (call-interactively #'ag-project)))
 
+(ignore-errors (require 'ag))
+
 (setq ag-highlight-search t)
 (when (featurep 'ag)
   (global-set-key [f7] 'my/ag))
@@ -3171,6 +3173,13 @@
 ;; (add-to-list 'auto-mode-alist '("\\.js$" . c++-mode))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "json")
+
+(defun my/json-mode-hook ()
+  (set (make-local-variable 'js-indent-level) 2))
+(add-hook 'json-mode-hook #'my/json-mode-hook)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (message "bat file, batch")
 
 ;; loaded from 'generic-x.el'