summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/mm-editing.el
diff options
context:
space:
mode:
authorThomas Voss <thomas.voss@humanwave.nl> 2025-06-11 14:59:58 +0200
committerThomas Voss <thomas.voss@humanwave.nl> 2025-06-11 14:59:58 +0200
commit03f5bb39561fad4d7745ff796b91f73933d99259 (patch)
treec02bf7e1b0657c555412c895f4efebdad777dde2 /.config/emacs/modules/mm-editing.el
parentfad74e4384176f8cf98c86cfbf5c0468c0f49dce (diff)
parenteb28738864a4b3dfe4443e897ccdea21c0765dc0 (diff)
Merge branch 'master' of github.com:Mango0x45/dotfiles
Diffstat (limited to '.config/emacs/modules/mm-editing.el')
-rw-r--r--.config/emacs/modules/mm-editing.el39
1 files changed, 32 insertions, 7 deletions
diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el
index 42fdb21..50be4ee 100644
--- a/.config/emacs/modules/mm-editing.el
+++ b/.config/emacs/modules/mm-editing.el
@@ -125,18 +125,22 @@ those should be listed in `mm-editing-indentation-settings'."
;;; Code Commenting
-(defun mm-c-comment-no-leading-stars ()
+(defun mm-c-comment-no-continue ()
(setq-local comment-continue " "))
+(defun mm-mhtml-comment-no-continue ()
+ (setq-local comment-continue " "))
+
(use-package newcomment
:custom
(comment-style 'multi-line)
:config
(dolist (mode '(c-mode c++-mode))
- (add-hook (mm-mode-to-hook mode) #'mm-c-comment-no-leading-stars)
+ (add-hook (mm-mode-to-hook mode) #'mm-c-comment-no-continue)
(when-let ((ts-mode (mm-mode-to-ts-mode mode))
((fboundp ts-mode)))
- (add-hook (mm-mode-to-hook ts-mode) #'mm-c-comment-no-leading-stars))))
+ (add-hook (mm-mode-to-hook ts-mode) #'mm-c-comment-no-leading-stars)))
+ (add-hook 'mhtml-mode #'mm-mhtml-comment-no-continue))
;;; Multiple Cursors
@@ -222,8 +226,8 @@ and *Messages* buffer. This forces that to not happen."
helpful-symbol
helpful-variable))
(add-to-list 'mc/cmds-to-run-once command))))
- :config
- (keymap-unset mc/keymap "<return>" :remove))
+ (with-eval-after-load 'multiple-cursors-core
+ (keymap-unset mc/keymap "<return>" :remove)))
;;; Increment Numbers
@@ -310,13 +314,33 @@ is as described by `emmet-expand-line'."
(emmet-self-closing-tag-style ""))
+;;; Number Formatting
+
+(use-package number-format-mode
+ :commands ( number-format-buffer number-format-region
+ number-unformat-buffer number-unformat-region
+ number-format-mode))
+
+
;;; Additional Major Modes
(use-package awk-ts-mode :ensure t)
-(use-package csv-mode :ensure t)
(use-package git-modes :ensure t)
(use-package sed-mode :ensure t)
+(use-package csv-mode
+ :ensure t
+ :custom
+ (csv-align-style 'auto)
+ (csv-align-padding 2))
+
+(use-package xcompose-mode
+ :vc ( :url "https://git.thomasvoss.com/xcompose-mode"
+ :branch "master"
+ :rev :newest
+ :vc-backend Git)
+ :ensure t)
+
;;; Mode-Specific Configurations
@@ -332,6 +356,7 @@ is as described by `emmet-expand-line'."
;;; Add Missing Extensions
-(add-to-list 'auto-mode-alist '("\\.tmac\\'" . nroff-mode))
+(dolist (pattern '("\\.tmac\\'" "\\.mom\\'"))
+ (add-to-list 'auto-mode-alist (cons pattern 'nroff-mode)))
(provide 'mm-editing) \ No newline at end of file