summary refs log tree commit diff
path: root/emacs/custom/my-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom/my-conf.el')
-rw-r--r--emacs/custom/my-conf.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/emacs/custom/my-conf.el b/emacs/custom/my-conf.el
index d91a409..bc41279 100644
--- a/emacs/custom/my-conf.el
+++ b/emacs/custom/my-conf.el
@@ -6,10 +6,10 @@
 
 ;;; Code:
 
-(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
-(add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode))
+(add-to-list 'auto-mode-alist '("\\.yml\\'"     . yaml-mode))
+(add-to-list 'auto-mode-alist '("\\.yaml\\'"    . yaml-mode))
 (add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))
-(add-to-list 'auto-mode-alist '("\\.tf\\'" . terraform-mode))
+(add-to-list 'auto-mode-alist '("\\.tf\\'"      . terraform-mode))
 
 (customize-set-variable 'dockerfile-use-sudo t)
 (customize-set-variable 'dockerfile-use-buildkit t)
@@ -23,5 +23,12 @@
 
 (add-hook 'terraform-mode-hook 'terraform-format-on-save-mode)
 
+(defun my/js-mode-hook ()
+  "Hooks for `js-mode'."
+  ;; format the buffer with `jq'
+  (local-set-key (kbd "C-c C-f") 'jq-format-json-buffer))
+
+(add-hook 'js-mode-hook 'my/js-mode-hook)
+
 (provide 'my-conf)
 ;;; my-conf.el ends here