diff options
| author | cashmere <cashmere@autistici.org> | 2026-08-08 11:46:56 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-08-08 11:46:56 +0200 |
| commit | 2dcbcfee082d24f6f33dbab6405efa73376adf4d (patch) | |
| tree | 79c36e44f7c9d88e95a700a63e3725ebc78dd6f0 | |
| parent | a92ab5a43ad9d44599ed27cf4354ed5673a3763a (diff) | |
| download | emacs-2dcbcfee082d24f6f33dbab6405efa73376adf4d.tar.gz | |
md: 2026-08-08T11:46:56+02:00
| -rw-r--r-- | config.el | 179 | ||||
| -rw-r--r-- | config.org | 8 | ||||
| -rw-r--r-- | themes/tinty-theme.el | 136 |
3 files changed, 200 insertions, 123 deletions
@@ -2078,6 +2078,19 @@ Timers that expired while Emacs was closed fire immediately." (advice-add 'denote-solo-switch :after #'my/denote-solo-sync-directory)) +(use-package company + :ensure t + :hook (after-init . global-company-mode) + :custom + (company-idle-delay 0) + (company-tooltip-idle-delay 0) ; Tooltip sofort, kein Delay + (company-minimum-prefix-length 2) + (company-require-match nil) + (company-frontends + '(company-pseudo-tooltip-unless-just-one-frontend ; ohne -with-delay + company-echo-metadata-frontend)) + (company-backends '(company-capf))) + (use-package which-key :ensure t :defer t @@ -2086,18 +2099,6 @@ Timers that expired while Emacs was closed fire immediately." :custom (which-key-idle-delay 0.3)) -(use-package corfu - :ensure t - :custom - (corfu-cycle t) - (corfu-auto t) - (corfu-auto-delay 0.2) - (corfu-auto-prefix 2) - :init - (global-corfu-mode) - (corfu-history-mode) - (corfu-popupinfo-mode)) - (use-package cape :ensure (:wait t) @@ -2135,15 +2136,6 @@ Timers that expired while Emacs was closed fire immediately." :init (setq prefix-help-command #'embark-prefix-help-command)) -(use-package orderless - :ensure t - :defer t ;; Load Orderless on demand. - :after vertico ;; Ensure Vertico is loaded before Orderless. - :init - (setq completion-styles '(orderless basic) ;; Set the completion styles. -completion-category-defaults nil ;; Clear default category settings. -completion-category-overrides '((file (styles partial-completion))))) ;; Customize file completion styles. - (use-package helm :ensure (:wait t) :hook @@ -2154,6 +2146,7 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi (helm-recentf-fuzzy-match t) (helm-move-to-line-cycle-in-source nil) (helm-split-window-inside-p t) + (helm-autoresize-mode 1) (helm-boring-buffer-regexp-list '("\\` " "\\`\\*helm" @@ -2178,11 +2171,21 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi ("C-k" . helm-previous-line))) (global-set-key (kbd "M-x") 'helm-M-x) -(use-package helm-flx +(use-package helm-xref :ensure t - :after helm - :config - (helm-flx-mode +1)) + :after helm) + +(use-package citre + :ensure t + :defer t + :init + (require 'citre-config) + :custom + (citre-default-create-tags-file-location 'in-dir) + (citre-edit-ctags-options-manually nil) + (citre-auto-enable-citre-mode-modes '(prog-mode)) + :bind (("C-c e" . citre-jump) + ("C-c u" . citre-update-this-tags-file))) (use-package eglot :ensure nil @@ -2228,14 +2231,40 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi (use-package nix-ts-mode :ensure t :mode "\\.nix\\'" - :hook (nix-ts-mode . eglot-ensure) :config + (modify-syntax-entry ?. "_" nix-ts-mode--syntax-table) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs '(nix-ts-mode . ("nixd"))))) (put 'eglot-workspace-configuration 'safe-local-variable #'listp) +(with-eval-after-load 'compile + (dolist (rule '((nix-def "^\\s-*- In [`']\\(/[^'\n]+\\)'" 1) + (nix-eval "^\\s-+at \\(/[^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):" 1 2 3) + (nix-trace "^\\s-+at \\(/nix/store/[^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):" 1 2 3 0))) + (add-to-list 'compilation-error-regexp-alist (car rule)) + (add-to-list 'compilation-error-regexp-alist-alist rule))) + +(defun nix-compile-goto-option () + (interactive) + (let (option path) + (save-excursion + (goto-char (point-min)) + (unless (re-search-forward "option `\\([^'\n]+\\)'" nil t) + (user-error "No nix option error found")) + (setq option (match-string 1)) + (unless (re-search-forward "- In `\\(/[^'\n]+\\)'" nil t) + (user-error "No definition file found")) + (setq path (match-string 1))) + (when (file-directory-p path) + (setq path (expand-file-name "default.nix" path))) + (find-file path) + (goto-char (point-min)) + (search-forward (car (last (split-string option "\\." t)))))) + +(keymap-set compilation-mode-map "C-c o" #'nix-compile-goto-option) + (use-package c-ts-mode :ensure nil :mode (("\\.c\\'" . c-ts-mode) @@ -2776,13 +2805,6 @@ so the working-tree diff stays visible until the user explicitly stages." ((dired-mode . diredfl-mode) (dirvish-directory-view-mode . diredfl-mode))) -(use-package nerd-icons-completion - :if ek-use-nerd-fonts ;; Load the package only if the user has configured to use nerd fonts. - :ensure t ;; Ensure the package is installed. - :after nerd-icons - :config - (nerd-icons-completion-mode)) - (defun ek/first-install () "dired" (interactive) ;; Allow this function to be called interactively. @@ -2890,6 +2912,21 @@ created later still get them." +(use-package batppuccin + :ensure t + :config + (load-theme 'batppuccin-mocha t)) + +;; (use-package solarized-theme +;; :ensure t +;; :config +;; (load-theme 'solarized-gruvbox-dark t)) + +;; (use-package tokyo-night +;; :ensure t +;; :config +;; (load-theme 'tokyo-night t)) + (use-package dirvish :ensure (:host github :repo "latiagertrutis/dirvish" :branch "main") :init @@ -3030,26 +3067,26 @@ still require a restart since elpaca queues run at init time." :after (wgrep helm)) (defun my/project-replace () - "Project-wide search via `helm-do-grep-ag-project'. + "Project-wide search via ripgrep (`helm-projectile-rg'). Press `C-x C-s' in the helm session to save results to a *hgrep* buffer, then `C-c C-p' (wgrep-change-to-wgrep-mode) to edit in place. `C-c C-c' commits, `C-c C-k' aborts." (interactive) - (call-interactively #'helm-do-grep-ag-project)) + (call-interactively #'helm-projectile-rg)) (defun my/helm-find-in (dir) (interactive "DFind files in: ") (helm-find-1 dir)) -(defun my/helm-grep-in (dir) - (interactive "DGrep in: ") - (let ((default-directory (file-name-as-directory dir))) - (helm-do-grep-ag nil))) +(defun my/helm-rg-in (dir) + "Search DIR recursively with ripgrep via Helm." + (interactive "DRipgrep in: ") + (helm-grep-ag (expand-file-name dir) nil)) -(defun my/denote-grep () +(defun my/denote-rg () + "Search `denote-directory' recursively with ripgrep via Helm." (interactive) - (let ((default-directory (expand-file-name denote-directory))) - (helm-do-grep-ag nil))) + (helm-grep-ag (expand-file-name denote-directory) nil)) (use-package persp-mode :ensure t @@ -3411,11 +3448,30 @@ place. `C-c C-c' commits, `C-c C-k' aborts." (setq auto-mode-alist (seq-remove (lambda (e) (eq (cdr e) 'pdf-view-mode)) auto-mode-alist))) +(defun my/nixfmt-buffer () + "Format the current buffer with nixfmt, no LSP required." + (interactive) + (let* ((src (buffer-substring-no-properties (point-min) (point-max))) + (formatted (with-temp-buffer + (insert src) + (unless (zerop (call-process-region + (point-min) (point-max) "nixfmt" t t nil)) + (user-error "nixfmt failed")) + (buffer-string)))) + (unless (string= src formatted) + (let ((pt (point))) + (erase-buffer) + (insert formatted) + (goto-char (min pt (point-max))))))) + (defun my/format-buffer () (interactive) (cond ((eq major-mode 'rust-ts-mode) (eglot-format-buffer)) - ((eq major-mode 'nix-ts-mode) (eglot-format-buffer)) + ((eq major-mode 'nix-ts-mode) + (if (bound-and-true-p eglot--managed-mode) + (eglot-format-buffer) + (my/nixfmt-buffer))) ((eq major-mode 'python-ts-mode) (eglot-format-buffer)) ((eq major-mode 'c-mode) (eglot-format-buffer)) ((bound-and-true-p eglot--managed-mode) (eglot-format-buffer)) @@ -3436,9 +3492,9 @@ workspace (e.g. *scratch*)." "SPC" '(my/find-file-or-switch-project :wk "find file/switch project") "sp" '(helm-projectile :wk "search project") "ss" '(helm-occur :wk "search line") - "sg" '(my/helm-grep-in :wk "grep in dir") + "sg" '(my/helm-rg-in :wk "rg in dir") "sf" '(my/helm-find-in :wk "find file in dir") - "/" '(helm-do-grep-ag-project :wk "search project") + "/" '(helm-projectile-rg :wk "search project") "." '(helm-find-files :wk "find file") "," '(helm-mini :wk "switch buffer") ":" (lambda () (interactive) (execute-extended-command nil)) @@ -3451,7 +3507,7 @@ workspace (e.g. *scratch*)." "dm" '(:ignore t :wk "Merge Notes") "dmr" '(denote-merge-region :wk "Merge Region") "dmf" '(denote-merge-file :wk "Merge File") - "dg" '(my/denote-grep :wk "Search") + "dg" '(my/denote-rg :wk "rg notes") "dl" '(denote-link-or-create t :wk "Link Note") "dn" '(denote t :wk "Create a new note") "dr" '(denote-rename-file t :wk "Rename Note") @@ -3570,9 +3626,10 @@ workspace (e.g. *scratch*)." "e b" '(eww-list-bookmarks :wk "bookmarks") "e h" '(eww-list-histories :wk "history") "e f" '(elfeed :wk "elfeed (rss)") - "e s" '(engine/search-duckduckgo :wk "search duckduckgo") + ;; "e s" '(engine/search-duckduckgo :wk "search duckduckgo") "e L" '(link-hint-open-link :wk "hint open link") "e C" '(link-hint-copy-link :wk "hint copy link") + "e x" '(xwidget-webkit-browse-url :wk "webkit browser") ) (defun my/flash-enabled-p () @@ -4146,6 +4203,10 @@ opening another file in same project does not re-notify." (format "%s-freebsd" arch))))) (advice-add 'ghostel--module-platform-tag :around #'my/ghostel-module-platform-tag) (require 'ghostel-compile) + ;; Route every `compile'-style call (compile, recompile, project-compile, + ;; projectile-compile-project, projectile-run-task, ...) through ghostel + ;; instead of the plain compilation-mode buffer. + (ghostel-compile-global-mode 1) (setq-default window-adjust-process-window-size-function #'window-adjust-process-window-size-largest) (evil-define-key 'normal ghostel-mode-map @@ -4225,10 +4286,10 @@ opening another file in same project does not re-notify." (when (executable-find "delta") (add-hook 'magit-mode-hook #'magit-delta-mode))) -(use-package pretty-sha-path - :ensure t - :config - (setopt global-pretty-sha-path-mode 't)) +;; (use-package pretty-sha-path +;; :ensure t +;; :config +;; (setopt global-pretty-sha-path-mode 't)) (use-package pulsar :ensure t @@ -4287,4 +4348,20 @@ opening another file in same project does not re-notify." :ensure nil :commands (zfs)) +(use-package org-tree-slide + :ensure t) +(when (require 'org-tree-slide nil t) + (global-set-key (kbd "<f8>") 'org-tree-slide-mode) + (global-set-key (kbd "S-<f8>") 'org-tree-slide-skip-done-toggle) + (define-key org-tree-slide-mode-map (kbd "<f9>") + 'org-tree-slide-move-previous-tree) + (define-key org-tree-slide-mode-map (kbd "<f10>") + 'org-tree-slide-move-next-tree) + (define-key org-tree-slide-mode-map (kbd "<f11>") + 'org-tree-slide-content) + (setq org-tree-slide-skip-outline-level 4) + (org-tree-slide-narrowing-control-profile) + (setq org-tree-slide-skip-comments 'inherit) + (setq org-tree-slide-skip-done nil)) + (provide 'init) @@ -5162,10 +5162,10 @@ opening another file in same project does not re-notify." * pretty-sha-path #+begin_src emacs-lisp -(use-package pretty-sha-path - :ensure t - :config - (setopt global-pretty-sha-path-mode 't)) +;; (use-package pretty-sha-path +;; :ensure t +;; :config +;; (setopt global-pretty-sha-path-mode 't)) #+end_src * pulsar-mode diff --git a/themes/tinty-theme.el b/themes/tinty-theme.el index 1096b6d..dac7528 100644 --- a/themes/tinty-theme.el +++ b/themes/tinty-theme.el @@ -19,67 +19,67 @@ (deftheme tinty "Noctalia theme with proper color contrast.") (let* (;; Tinted8 UI surface colors - (ui-bg "#303446") - (ui-fg "#c6d0f5") - (ui-fg-dim "#a5adce") + (ui-bg "#1e1e2e") + (ui-fg "#cdd6f4") + (ui-fg-dim "#a6adc8") ;; Use dim foreground for borders/muted chrome so they stay visible in ;; light variants (the raw border color is nearly white on latte). - (ui-border "#a5adce") - (ui-line-highlight "#353848") - (ui-bg-dark "#292c3c") - (ui-bg-light "#51576d") + (ui-border "#a6adc8") + (ui-line-highlight "#232336") + (ui-bg-dark "#181825") + (ui-bg-light "#45475a") ;; Tinted8 UI accent/status colors (ui-accent "#f38ba8") - (ui-link "#8caaee") - (ui-info "#ef9f76") - (ui-error "#e78284") - (ui-success "#a6d189") - (ui-warning "#e5c890") + (ui-link "#89b4fa") + (ui-info "#fab387") + (ui-error "#f38ba8") + (ui-success "#a6e3a1") + (ui-warning "#f9e2af") ;; Tinted8 UI container colors (for BACKGROUNDS only) - (ui-selection-bg "#51576d") - (ui-selection-fg "#c6d0f5") - (ui-button-bg "#51576d") - (ui-button-fg "#c6d0f5") - (ui-tooltip-bg "#414559") - (ui-tooltip-fg "#c6d0f5") - (ui-active-text-bg "#949cbb") - (ui-active-text-fg "#c6d0f5") - (ui-search-bg "#81c8be") - (ui-search-fg "#303446") + (ui-selection-bg "#45475a") + (ui-selection-fg "#cdd6f4") + (ui-button-bg "#45475a") + (ui-button-fg "#cdd6f4") + (ui-tooltip-bg "#313244") + (ui-tooltip-fg "#cdd6f4") + (ui-active-text-bg "#9399b2") + (ui-active-text-fg "#cdd6f4") + (ui-search-bg "#94e2d5") + (ui-search-fg "#1e1e2e") ;; Tinted8 syntax colors ;; Comments use dim foreground instead of the raw syntax-comment gray, ;; which becomes almost invisible in light variants. - (syntax-comment "#a5adce") - (syntax-constant "#ef9f76") - (syntax-function "#8caaee") - (syntax-keyword "#ca9ee6") - (syntax-string "#a6d189") - (syntax-type "#e5c890") + (syntax-comment "#a6adc8") + (syntax-constant "#fab387") + (syntax-function "#89b4fa") + (syntax-keyword "#cba6f7") + (syntax-string "#a6e3a1") + (syntax-type "#f9e2af") ;; Give variables/imported names a distinct hue instead of blending into ;; the default foreground. - (syntax-variable "#b06add") - (syntax-warning "#eeb8b9") - (syntax-preprocessor "#5281eb") - (syntax-annotation "#e5c890") - (syntax-attribute "#c4d2f3") - (syntax-number "#ef9f76") - (syntax-operator "#99d1db") + (syntax-variable "#aa69f7") + (syntax-warning "#f6c5d3") + (syntax-preprocessor "#488dfd") + (syntax-annotation "#f9e2af") + (syntax-attribute "#c7dafa") + (syntax-number "#fab387") + (syntax-operator "#89dceb") ;; Raw palette colors for rainbow headings, delimiters, terminal faces, ;; and anywhere else we need a predictable hue cycle. - (pal-red "#e78284") - (pal-orange "#ef9f76") - (pal-yellow "#e5c890") - (pal-green "#a6d189") - (pal-cyan "#81c8be") - (pal-blue "#8caaee") - (pal-magenta "#ca9ee6") - (pal-gray "#949cbb") - (pal-white "#c6d0f5") - (pal-black "#303446")) + (pal-red "#f38ba8") + (pal-orange "#fab387") + (pal-yellow "#f9e2af") + (pal-green "#a6e3a1") + (pal-cyan "#94e2d5") + (pal-blue "#89b4fa") + (pal-magenta "#cba6f7") + (pal-gray "#9399b2") + (pal-white "#cdd6f4") + (pal-black "#1e1e2e")) (custom-theme-set-faces 'tinty @@ -290,13 +290,13 @@ ;; === Terminal colors - mapped to the palette so they stay correct in both variants === `(term-color-black ((t (:foreground ,ui-bg-dark :background ,ui-bg-dark)))) - `(term-color-red ((t (:foreground "#e78284" :background "#e78284")))) - `(term-color-green ((t (:foreground "#a6d189" :background "#a6d189")))) - `(term-color-yellow ((t (:foreground "#e5c890" :background "#e5c890")))) - `(term-color-blue ((t (:foreground "#8caaee" :background "#8caaee")))) - `(term-color-magenta ((t (:foreground "#ca9ee6" :background "#ca9ee6")))) - `(term-color-cyan ((t (:foreground "#81c8be" :background "#81c8be")))) - `(term-color-white ((t (:foreground "#c6d0f5" :background "#c6d0f5")))) + `(term-color-red ((t (:foreground "#f38ba8" :background "#f38ba8")))) + `(term-color-green ((t (:foreground "#a6e3a1" :background "#a6e3a1")))) + `(term-color-yellow ((t (:foreground "#f9e2af" :background "#f9e2af")))) + `(term-color-blue ((t (:foreground "#89b4fa" :background "#89b4fa")))) + `(term-color-magenta ((t (:foreground "#cba6f7" :background "#cba6f7")))) + `(term-color-cyan ((t (:foreground "#94e2d5" :background "#94e2d5")))) + `(term-color-white ((t (:foreground "#cdd6f4" :background "#cdd6f4")))) ;; === EShell === `(eshell-prompt ((t (:foreground ,ui-accent :weight bold)))) @@ -509,14 +509,14 @@ `(ansi-color-magenta ((t (:foreground ,pal-magenta :background ,pal-magenta)))) `(ansi-color-cyan ((t (:foreground ,pal-cyan :background ,pal-cyan)))) `(ansi-color-white ((t (:foreground ,pal-white :background ,pal-white)))) - `(ansi-color-bright-black ((t (:foreground "#51576d" :background "#51576d")))) - `(ansi-color-bright-red ((t (:foreground "#eeb8b9" :background "#eeb8b9")))) - `(ansi-color-bright-green ((t (:foreground "#c7e2b5" :background "#c7e2b5")))) - `(ansi-color-bright-yellow ((t (:foreground "#eee0c4" :background "#eee0c4")))) - `(ansi-color-bright-blue ((t (:foreground "#c4d2f3" :background "#c4d2f3")))) - `(ansi-color-bright-magenta ((t (:foreground "#e4d0f1" :background "#e4d0f1")))) - `(ansi-color-bright-cyan ((t (:foreground "#acdbd4" :background "#acdbd4")))) - `(ansi-color-bright-white ((t (:foreground "#b5bfe2" :background "#b5bfe2")))) + `(ansi-color-bright-black ((t (:foreground "#45475a" :background "#45475a")))) + `(ansi-color-bright-red ((t (:foreground "#f6c5d3" :background "#f6c5d3")))) + `(ansi-color-bright-green ((t (:foreground "#d4efd2" :background "#d4efd2")))) + `(ansi-color-bright-yellow ((t (:foreground "#fcf6e9" :background "#fcf6e9")))) + `(ansi-color-bright-blue ((t (:foreground "#c7dafa" :background "#c7dafa")))) + `(ansi-color-bright-magenta ((t (:foreground "#ece0fb" :background "#ece0fb")))) + `(ansi-color-bright-cyan ((t (:foreground "#c6ede6" :background "#c6ede6")))) + `(ansi-color-bright-white ((t (:foreground "#bac2de" :background "#bac2de")))) ;; === Anzu === `(anzu-replace-highlight ((t (:background ,ui-line-highlight :foreground ,ui-error :weight bold :strike-through t)))) @@ -1167,14 +1167,14 @@ ;; === Term (extended) === `(term ((t (:foreground ,ui-fg :background ,ui-bg)))) `(term-bold ((t (:weight bold)))) - `(term-color-bright-black ((t (:foreground "#51576d" :background "#51576d")))) - `(term-color-bright-red ((t (:foreground "#eeb8b9" :background "#eeb8b9")))) - `(term-color-bright-green ((t (:foreground "#c7e2b5" :background "#c7e2b5")))) - `(term-color-bright-yellow ((t (:foreground "#eee0c4" :background "#eee0c4")))) - `(term-color-bright-blue ((t (:foreground "#c4d2f3" :background "#c4d2f3")))) - `(term-color-bright-magenta ((t (:foreground "#e4d0f1" :background "#e4d0f1")))) - `(term-color-bright-cyan ((t (:foreground "#acdbd4" :background "#acdbd4")))) - `(term-color-bright-white ((t (:foreground "#b5bfe2" :background "#b5bfe2")))) + `(term-color-bright-black ((t (:foreground "#45475a" :background "#45475a")))) + `(term-color-bright-red ((t (:foreground "#f6c5d3" :background "#f6c5d3")))) + `(term-color-bright-green ((t (:foreground "#d4efd2" :background "#d4efd2")))) + `(term-color-bright-yellow ((t (:foreground "#fcf6e9" :background "#fcf6e9")))) + `(term-color-bright-blue ((t (:foreground "#c7dafa" :background "#c7dafa")))) + `(term-color-bright-magenta ((t (:foreground "#ece0fb" :background "#ece0fb")))) + `(term-color-bright-cyan ((t (:foreground "#c6ede6" :background "#c6ede6")))) + `(term-color-bright-white ((t (:foreground "#bac2de" :background "#bac2de")))) ;; === Transient === `(transient-heading ((t (:foreground ,pal-blue :weight bold)))) |
