From 6f9fadaea8b608c1c5a050403aaba39c7f8118c6 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Fri, 8 Apr 2022 20:51:55 +0200 Subject: [PATCH] Configure some basic preferences --- config.el | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ init.el | 6 +++--- packages.el | 3 +++ 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/config.el b/config.el index 6d0643f..59df154 100644 --- a/config.el +++ b/config.el @@ -82,3 +82,55 @@ ;; ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. + +;; ----------------------------------------------------------------------------- +;; Override doom configuration. +;; ----------------------------------------------------------------------------- + +;; Remove org-agenda from dashboard. +(let ((org-agenda-section + (seq-find (lambda (item) (string= (nth 0 item) "Open org-agenda")) + +doom-dashboard-menu-sections))) + (delete org-agenda-section +doom-dashboard-menu-sections)) + +;; Remove the silly doom newline advice. +(advice-remove 'newline-and-indent #'+default--newline-indent-and-continue-comments-a) + +;; Rainbow delimiters in all prog-mode buffers. +(add-hook! prog-mode #'rainbow-delimiters-mode-enable) + +;; ----------------------------------------------------------------------------- +;; Additional coniguration for doom modules. +;; ----------------------------------------------------------------------------- + +;; Always open magit in other window. +(after! magit (setq magit-display-buffer-function #'magit-display-buffer-traditional)) + +;; ----------------------------------------------------------------------------- +;; Configuration for additional packages on top of doom and its modules. +;; ----------------------------------------------------------------------------- + +;; Kill line when calling kill-region without a selected region. +(use-package! whole-line-or-region + :config + (define-key whole-line-or-region-local-mode-map [remap comment-dwim] nil) + (whole-line-or-region-global-mode t)) + +;; Duplicate things. +(use-package! duplicate-thing + :bind (("M-C" . duplicate-thing))) + +;; ----------------------------------------------------------------------------- +;; Keybindings. +;; ----------------------------------------------------------------------------- + +(map! + ;; Create binding before dired is loaded. + "C-x C-j" #'dired-jump + ;; More convenient window switching. + "M-o" #'other-window + "C-x o" #'other-popup + ;; Kill current buffer without prompting. + :desc "kill-buffer" "C-x k" (lambda () + (interactive) + (let (kill-buffer-query-functions) (kill-buffer)))) diff --git a/init.el b/init.el index 881c728..c104ea1 100644 --- a/init.el +++ b/init.el @@ -46,7 +46,7 @@ ;;treemacs ; a project drawer, like neotree but cooler ;;unicode ; extended unicode support for various languages vc-gutter ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing @@ -69,7 +69,7 @@ dired ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent ;;ibuffer ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes + (undo +tree) ; persistent, smarter undo for your inevitable mistakes vc ; version-control and Emacs, sitting in a tree :term @@ -151,7 +151,7 @@ ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - org ; organize your plain life in plain text + ;;org ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional diff --git a/packages.el b/packages.el index b80e9cc..c24c678 100644 --- a/packages.el +++ b/packages.el @@ -8,6 +8,8 @@ ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;(package! some-package) +(package! duplicate-thing) +(package! whole-line-or-region) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: @@ -25,6 +27,7 @@ ;; If you'd like to disable a package included with Doom, you can do so here ;; with the `:disable' property: ;(package! builtin-package :disable t) +(package! hl-line :disable t) ;; You can override the recipe of a built in package without having to specify ;; all the properties for `:recipe'. These will inherit the rest of its recipe