diff options
Diffstat (limited to '.config/emacs/modules')
-rw-r--r-- | .config/emacs/modules/mm-buffer-menu.el | 15 | ||||
-rw-r--r-- | .config/emacs/modules/mm-editing.el | 39 | ||||
-rw-r--r-- | .config/emacs/modules/mm-modeline.el | 7 | ||||
-rw-r--r-- | .config/emacs/modules/mm-projects.el | 27 | ||||
-rw-r--r-- | .config/emacs/modules/mm-theme.el | 9 |
5 files changed, 70 insertions, 27 deletions
diff --git a/.config/emacs/modules/mm-buffer-menu.el b/.config/emacs/modules/mm-buffer-menu.el new file mode 100644 index 0000000..7b725c6 --- /dev/null +++ b/.config/emacs/modules/mm-buffer-menu.el @@ -0,0 +1,15 @@ +;;; mm-buffer-menu.el --- Buffer Menu configuration -*- lexical-binding: t; -*- + +(defun mm-Buffer-menu-delete-all () + "Mark all buffers for deletion." + (interactive nil Buffer-menu-mode) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (Buffer-menu-delete)))) + +(use-package buff-menu + :bind ( :map Buffer-menu-mode-map + ("D" . mm-Buffer-menu-delete-all))) + +(provide 'mm-buffer-menu)
\ No newline at end of file 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 diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el index 2981307..d1ec6f0 100644 --- a/.config/emacs/modules/mm-modeline.el +++ b/.config/emacs/modules/mm-modeline.el @@ -38,7 +38,8 @@ (propertize " (modified)" 'face 'mm-modeline-buffer-modified-face))) (defconst mm-modeline-mode-acronyms - '("css" "csv" "gsp" "html" "json" "mhtml" "rfc" "scss" "toml" "tsv" "url") + '("css" "csv" "gsp" "html" "json" "mhtml" "rfc" "scss" "sql" "toml" "tsv" + "url") "List of acronyms in major mode names that should be capitalized.") (defconst mm-modeline-remap-alist @@ -50,7 +51,9 @@ ("Gmake" . "GMake") ("Imake" . "IMake") ("Js" . "JavaScript") - ("Ts Mode" . "Tree-Sitter Mode")) + ("Ts Mode" . "Tree-Sitter Mode") + ("Wdired" . "WDired") + ("Xcompose" . "XCompose")) "Alist of substrings in major mode names that should be remapped. Some major modes have substrings that would be better displayed in another manner. For example expanding an abbreviation such as ‘Js’ to diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el index be80789..00342f5 100644 --- a/.config/emacs/modules/mm-projects.el +++ b/.config/emacs/modules/mm-projects.el @@ -21,22 +21,17 @@ This is intended to be called interactively via :config (unless mm-darwin-p (if-let ((repo-directory (getenv "REPODIR"))) - (with-eval-after-load 'async - (async-start - (lambda () - (require 'project) - (let* ((list-dir - (lambda (path) - (directory-files path :full "\\`[^.]"))) - (directories - (cl-loop for author in (funcall list-dir (getenv "REPODIR")) - append (cl-loop for path in (funcall list-dir author) - collect (list (concat path "/")))))) - (with-temp-buffer - (prin1 directories (current-buffer)) - (write-file project-list-file)))) - (lambda (_proc) - (project--read-project-list)))) + (let* ((list-dir + (lambda (path) + (directory-files path :full "\\`[^.]"))) + (directories + (cl-loop for author in (funcall list-dir (getenv "REPODIR")) + append (cl-loop for path in (funcall list-dir author) + collect (list (concat path "/")))))) + (with-temp-buffer + (prin1 directories (current-buffer)) + (write-file project-list-file)) + (project--read-project-list)) (warn "The REPODIR environment variable is not set.")))) diff --git a/.config/emacs/modules/mm-theme.el b/.config/emacs/modules/mm-theme.el index 53dc97b..95c96c9 100644 --- a/.config/emacs/modules/mm-theme.el +++ b/.config/emacs/modules/mm-theme.el @@ -16,7 +16,7 @@ "The default monospace font. This is a plist containing a font name, -weight, and -height.") -(defvar mm-theme-proportional-font '("SF Pro" :weight regular :height 162) +(defvar mm-theme-proportional-font '("OpenSans" :weight regular :height 162) "The default proportional font. This is a plist containing a font name, -weight, and -height.") @@ -203,9 +203,14 @@ See also the `mm-theme-background-opacity' variable." ;;; More Intuiative UI for Certain Modes +(defun mm-disable-line-selection-mode () + (line-selection-mode -1)) + (use-package line-selection-mode :hook ((bookmark-bmenu-mode dired-mode ibuffer-mode magit-repolist-mode) - . line-selection-mode)) + . line-selection-mode) + :config + (add-hook 'wdired-mode-hook #'mm-disable-line-selection-mode)) ;;; Line Highlighting |