diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-appearance.el | 4 | ||||
-rw-r--r-- | lisp/init-editing.el | 31 | ||||
-rw-r--r-- | lisp/init-eldoc.el | 14 | ||||
-rw-r--r-- | lisp/init-git.el | 8 | ||||
-rw-r--r-- | lisp/init-org.el | 6 | ||||
-rw-r--r-- | lisp/init-restclient.el | 17 | ||||
-rw-r--r-- | lisp/init-rust.el | 8 | ||||
-rw-r--r-- | lisp/init-vertico.el | 1 |
8 files changed, 34 insertions, 55 deletions
diff --git a/lisp/init-appearance.el b/lisp/init-appearance.el index 1fea9af..56cfd12 100644 --- a/lisp/init-appearance.el +++ b/lisp/init-appearance.el @@ -54,6 +54,10 @@ (use-package prog-mode :hook ((prog-mode . mpolden/prog-mode-buffer-local-variables))) +;; render colors in compilation buffer +(use-package ansi-color + :hook ((compilation-filter . ansi-color-compilation-filter))) + ;; display line and column numbers in mode-line (setq line-number-mode t column-number-mode t) diff --git a/lisp/init-editing.el b/lisp/init-editing.el index 9ba858a..20392b9 100644 --- a/lisp/init-editing.el +++ b/lisp/init-editing.el @@ -2,28 +2,25 @@ ;;; Commentary: ;;; Code: -;; use zap-up-to-char instead of zap-to-char -(use-package misc - :bind ("M-z" . zap-up-to-char)) - ;; enable subword-mode in prog-mode (use-package subword :diminish subword-mode :hook ((prog-mode . subword-mode))) -;; quick access to calculator -(use-package calc - :bind ("C-c @" . quick-calc)) - -(use-package crux - :ensure t - :bind (("M-j" . crux-top-join-line) - ("C-c n" . crux-rename-file-and-buffer) - ("C-c w" . crux-kill-buffer-truename) - ("C-c d" . crux-duplicate-current-line-or-region) - ("C-c C-o" . crux-open-with) - ("C-x C-r" . crux-recentf-find-file) - ("C-x C-o" . crux-recentf-find-directory))) +;; M-z runs zap-up-to-char instead of zap-to-char +(global-set-key (kbd "M-z") 'zap-up-to-char) + +;; C-c @ opens a simple calculator +(global-set-key (kbd "C-c @") 'quick-calc) + +;; M-j joins line +(global-set-key (kbd "M-j") 'join-line) + +;; C-c d duplicates the current line or region +(global-set-key (kbd "C-c d") 'duplicate-dwim) + +;; C-c n renames visited file +(global-set-key (kbd "C-c n") 'rename-visited-file) ;; C-x k kills current buffer (global-set-key (kbd "C-x k") 'kill-current-buffer) diff --git a/lisp/init-eldoc.el b/lisp/init-eldoc.el deleted file mode 100644 index ce99708..0000000 --- a/lisp/init-eldoc.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; init-eldoc.el --- configure documentation viewer -*- lexical-binding:t -*- -;;; Commentary: -;;; Code: - -(use-package eldoc - :commands eldoc-mode - :init - ;; always display documentation in a separate buffer - (setq eldoc-display-functions '(eldoc-display-in-buffer)) - :diminish) - -(provide 'init-eldoc) - -;;; init-eldoc.el ends here diff --git a/lisp/init-git.el b/lisp/init-git.el index 4137bd9..c681491 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -27,7 +27,13 @@ If NOSELECT is non-nil, do not select the window." :map magit-status-mode-map ;; make C-o and o behave as in dired ("o" . mpolden/magit-visit-file-other-window) - ("C-o" . mpolden/magit-visit-file-other-window-noselect))) + ("C-o" . mpolden/magit-visit-file-other-window-noselect)) + + :config + ;; absorb automatically fixes up existing commits + ;; https://github.com/tummychow/git-absorb + (transient-replace-suffix 'magit-commit 'magit-commit-autofixup + '("x" "Absorb changes" magit-commit-absorb))) (use-package forge :ensure t diff --git a/lisp/init-org.el b/lisp/init-org.el index 3924d3a..338e68f 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -104,6 +104,9 @@ to `org-goto'." (shell . t)) org-babel-python-command "python3") + ;; skip confirmation when evaluating code blocks + (setq org-confirm-babel-evaluate nil) + :config ;; enable template expansion when typing <s in org-mode (add-to-list 'org-modules 'org-tempo t)) @@ -117,6 +120,9 @@ to `org-goto'." (use-package org-modern :ensure t + :init + ;; do not use folding indicators + (setq org-modern-star 'replace) :config (global-org-modern-mode 1)) diff --git a/lisp/init-restclient.el b/lisp/init-restclient.el deleted file mode 100644 index 542325d..0000000 --- a/lisp/init-restclient.el +++ /dev/null @@ -1,17 +0,0 @@ -;;; init-restclient.el --- configure restclient -*- lexical-binding:t -*- -;;; Commentary: -;;; Code: - -(use-package restclient - :ensure t - :init - ;; limit number of times vars are substituted - (setq restclient-vars-max-passes 2) - ;; use matching client certificates from ~/.authinfo - (setq network-stream-use-client-certificates t) - ;; use this mode for .http extension - :mode (("\\.http\\'" . restclient-mode))) - -(provide 'init-restclient) - -;;; init-restclient.el ends here diff --git a/lisp/init-rust.el b/lisp/init-rust.el index fe676a7..0bd1816 100644 --- a/lisp/init-rust.el +++ b/lisp/init-rust.el @@ -2,12 +2,8 @@ ;;; Commentary: ;;; Code: -(use-package rustic - :ensure t - :init - ;; let init-eglot handle lsp integration - (setq rustic-lsp-setup-p nil) - (setq rustic-lsp-client 'eglot)) +(use-package rust-mode + :ensure t) (provide 'init-rust) diff --git a/lisp/init-vertico.el b/lisp/init-vertico.el index b3266f7..36046fd 100644 --- a/lisp/init-vertico.el +++ b/lisp/init-vertico.el @@ -27,6 +27,7 @@ remote projects." :bind (("C-x b" . consult-buffer) ("C-c i" . consult-imenu) ("C-c m" . consult-flymake) + ("C-x C-r" . consult-recent-file) ("M-g M-g" . consult-goto-line))) ;; show rich annotations in the minibuffer |