From cc945d0568ce0d7666f1dfe539e4ee146c423ddb Mon Sep 17 00:00:00 2001 From: earnest ma Date: Mon, 13 Jun 2022 09:35:59 -0400 Subject: [PATCH] Doom Emacs: add some more old changes and move things around --- doom/.config/doom/+projects.el | 3 ++- doom/.config/doom/+ui.el | 19 ++++++++++++++++++- doom/.config/doom/config.el | 11 ++++++++--- doom/.config/doom/init.el | 12 ++++++------ 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/doom/.config/doom/+projects.el b/doom/.config/doom/+projects.el index 4c45109..5728cae 100644 --- a/doom/.config/doom/+projects.el +++ b/doom/.config/doom/+projects.el @@ -12,7 +12,8 @@ projects in other locations.") (setq projectile-project-search-path project-locations)) (after! magit - (setq magit-save-repository-buffers t + (add-hook! 'after-save-hook #'magit-after-save-refresh-status) + (setq magit-save-repository-buffers t ; ask to save modified files in repo magit-repository-directories project-locations)) (use-package! ghq) diff --git a/doom/.config/doom/+ui.el b/doom/.config/doom/+ui.el index 7eee037..401616c 100644 --- a/doom/.config/doom/+ui.el +++ b/doom/.config/doom/+ui.el @@ -12,7 +12,15 @@ (setq doom-fallback-buffer-name "► Doom" +doom-dashboard-name "► Doom") -;; From Tecosaur's config: hide encoding when it's what's expected +;; pop-ups +(setq which-key-idle-delay 0.25) +(setq company-idle-delay 0.1) + +;; centaur tabs issue: https://github.com/ema2159/centaur-tabs/issues/181 +(after! centaur-tabs + (centaur-tabs-group-by-projectile-project)) + +;; From Tecosaur's config: hide encoding in modeline if usual (defun doom-modeline-conditional-buffer-encoding () "We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case" (setq-local doom-modeline-buffer-encoding @@ -21,3 +29,12 @@ (not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2)))) t))) (add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding) + +;; Also from Tecosaur's config (modified slightly): better window title +(setq frame-title-format + '("" + "%b" ; removed the org-roam part + (:eval + (let ((project-name (projectile-project-name))) + (unless (string= "-" project-name) + (format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name)))))) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index 313d419..f9a6422 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -24,18 +24,23 @@ evil-want-fine-undo t ; more history when in insert mode evil-split-window-below t ; switch to window after creation evil-vsplit-window-right t + evil-kill-on-visual-paste nil ; copy pasting truncate-string-ellipsis "…" ; Unicode ellispis are nicer than "...", and also save /precious/ space password-cache-expiry nil ; don't expire ) (global-subword-mode 1) ; Iterate through CamelCase words -(setq which-key-idle-delay 0.25) -(setq company-idle-delay 0.1) - ;; speed-type (use-package! speed-type) +;; company +(after! company + (setq company-idle-delay 0.1 + company-minimum-prefix-length 2 + ;; doesn't show in childframe, but might be useful in terminal + company-show-quick-access 1)) + ;; Whenever you reconfigure a package, make sure to wrap your config in an ;; `after!' block, otherwise Doom's defaults may override your settings. E.g. ;; diff --git a/doom/.config/doom/init.el b/doom/.config/doom/init.el index b26915d..64debed 100644 --- a/doom/.config/doom/init.el +++ b/doom/.config/doom/init.el @@ -15,17 +15,17 @@ ;; directory (for easy access to its source code). (doom! :input - bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh ;;chinese ;;japanese ;;layout ; auie,ctsrnm is the superior home row :completion - company ; the ultimate code completion backend + (company +childframe) ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life - vertico ; the search engine of the future + (vertico +icons) ; the search engine of the future :ui ;;deft ; notational velocity for Emacs @@ -85,11 +85,11 @@ ;;grammar ; tasing grammar mistake every you make :tools - ;;ansible + ansible ;;biblio ; Writes a PhD for you (citation needed) ;;debugger ; FIXME stepping through code, to help you add bugs direnv - ;;docker + docker editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) @@ -156,7 +156,7 @@ ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - (python +lsp +poetry) ; beautiful is better than ugly + (python +lsp +pyright +poetry) ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6