summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2019-12-18 02:01:43 -0500
committerAmin Bandali <bandali@gnu.org>2019-12-18 02:02:49 -0500
commit23434d06cfb8f9f28c5b40a52db04bf7aba7d81e (patch)
treeafc275e299b784a5ad77fcea7ef62bf063055987
parent36e72f06b89074a5d56e0ca08e61c22806ba1e45 (diff)
downloadconfigs-23434d06cfb8f9f28c5b40a52db04bf7aba7d81e.tar.gz
configs-23434d06cfb8f9f28c5b40a52db04bf7aba7d81e.tar.xz
configs-23434d06cfb8f9f28c5b40a52db04bf7aba7d81e.zip
emacs: alloy-mode: rebind TAB to indent-for-tab-command
-rw-r--r--.emacs.d/init.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 24d622f..57a8f74 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1416,7 +1416,21 @@ This function is intended for use with `ivy-ignore-buffers'."
(use-package alloy-mode
:straight (:host github :repo "dwwmmn/alloy-mode")
:mode "\\.als\\'"
- :config (setq alloy-basic-offset 2)
+ :config
+ (setq alloy-basic-offset 2)
+ ;; (defun b/alloy-simple-indent (start end)
+ ;; (interactive "r")
+ ;; ;; (if (region-active-p)
+ ;; ;; (indent-rigidly start end alloy-basic-offset)
+ ;; ;; (if (bolp)
+ ;; ;; (indent-rigidly (line-beginning-position)
+ ;; ;; (line-end-position)
+ ;; ;; alloy-basic-offset)))
+ ;; (indent-to (+ (current-column) alloy-basic-offset)))
+ :bind (:map alloy-mode-map
+ ("RET" . electric-newline-and-maybe-indent)
+ ;; ("TAB" . b/alloy-simple-indent)
+ ("TAB" . indent-for-tab-command))
:hook (alloy-mode . (lambda () (setq-local indent-tabs-mode nil))))
(eval-when-compile (defvar lean-mode-map))