From afa2eb42588da76d7c111bfc414a08416feda836 Mon Sep 17 00:00:00 2001 From: cashmere Date: Wed, 19 Aug 2026 13:05:59 +0200 Subject: 2026-08-19T13:06:01+02:00 --- config.el | 125 +++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 100 insertions(+), 25 deletions(-) (limited to 'config.el') diff --git a/config.el b/config.el index e2a64c6..215c2f2 100644 --- a/config.el +++ b/config.el @@ -2241,12 +2241,7 @@ Timers that expired while Emacs was closed fire immediately." (company-backends '(company-capf)) :config (defun my/company-limit-candidates (candidates) - (seq-take candidates 4)) - - (define-key company-mode-map [remap indent-for-tab-command] - #'company-manual-begin) - (define-key company-mode-map [remap c-indent-line-or-region] - #'company-manual-begin)) + (seq-take candidates 4))) (use-package which-key :ensure t @@ -2273,20 +2268,6 @@ Timers that expired while Emacs was closed fire immediately." ;; completion functions takes precedence over the global list. (add-hook 'completion-at-point-functions #'cape-file)) -(use-package embark - :ensure (:wait t) - :defer t - :bind - (("C-." . embark-act) - ("M-." . embark-dwim) - ("C-h B" . embark-bindings) - :map minibuffer-local-map - ("C-c C-a" . embark-act-all) - ("C-c C-e" . embark-export) - ("C-c C-o" . embark-collect)) - :init - (setq prefix-help-command #'embark-prefix-help-command)) - (use-package helm :ensure (:wait t) :hook @@ -2315,7 +2296,7 @@ Timers that expired while Emacs was closed fire immediately." "\\`\\*elpaca-log\\*\\'" "\\`\\*Native-compile-Log\\*\\'" "\\`\\*Async-native-compile-log\\*\\'")) - (helm-display-function #'helm-display-buffer-in-own-frame) + ;; (helm-display-function #'helm-display-buffer-in-own-frame) :bind (:map helm-map ("C-j" . helm-next-line) ("C-k" . helm-previous-line))) @@ -2402,6 +2383,13 @@ Timers that expired while Emacs was closed fire immediately." (kbd "g r") #'citre-jump-to-reference (kbd "g b") #'citre-jump-back))) +(use-package nov + :ensure t + :mode ("\\.epub\\'" . nov-mode) + :hook (nov-mode . visual-line-mode) + :custom + (nov-text-width 100)) + (use-package typst-ts-mode :ensure t :mode "\\.typ\\'") @@ -2883,8 +2871,6 @@ so the working-tree diff stays visible until the user explicitly stages." (blink-cursor-mode 0) (setq-default cursor-type 'box) -(defvar cashmere/font-height 180) - (defun cashmere/set-fonts (&optional frame) "Apply the MapleMono faces, but only on graphical frames. Runs per-frame so a TTY-only daemon never touches fonts while GUI frames @@ -3030,6 +3016,8 @@ still require a restart since elpaca queues run at init time." (use-package projectile :ensure (:wait t) :demand t + :bind-keymap + (("C-x p" . projectile-command-map)) :config (projectile-mode +1) (setq projectile-completion-system 'default @@ -3483,7 +3471,6 @@ workspace (e.g. *scratch*)." "fr" '(helm-recentf :wk "recent files") "ff" '(helm-find-files :wk "find file") "fs" '(save-buffer :wk "save file") - "b" '(:ignore t :wk "buffer/bookmarks") "bb" '(helm-filtered-bookmarks :wk "display current bookmarks") "bi" '(my/ibuffer-workspace :wk "ibuffer (workspace)") @@ -4297,7 +4284,7 @@ opening another file in same project does not re-notify." (minimal-dashboard-text (lambda () (format "started in %s" (emacs-init-time)))) ;; Multi-line text (with center alignment) is also supported - ;; (minimal-dashboard-text "My multiline\nstring is here") + (minimal-dashboard-text "You never quit Emacs\nYou just die at some point") ;; Click support for image ;; (minimal-dashboard-image-click-handler @@ -4318,4 +4305,92 @@ opening another file in same project does not re-notify." (minimal-dashboard-enable-resize-handling t) ;; to refresh when buffer is resized (minimal-dashboard-modeline-shown t)) ;; visibility of the modeline +(use-package rsync-ui + :ensure nil + :commands (rsync-ui rsync-ui-dired) + :bind (:map dired-mode-map + ("C-c r" . rsync-ui-dired)) + :init + (with-eval-after-load 'general + (my-leader "or" '(rsync-ui :wk "rsync")))) + +(defun rlr/org-export-html-to-browser () + "Export the current Org buffer to a temporary HTML file in the system temp directory, open it, and then delete it when Emacs is killed." + (interactive) + (unless (derived-mode-p 'org-mode) + (user-error "Not in an Org buffer")) + (let* ((tmp (make-temp-file "org-preview-" nil ".html")) + (org-export-in-background nil) + (org-html-head-include-default-style nil) + (org-html-head-include-scripts nil) + (org-html-head rlr/org-preview-css) + (org-html-validation-link nil)) + (org-export-to-file 'html tmp) + (add-hook 'kill-emacs-hook + (lambda () (ignore-errors (delete-file tmp)))) + (funcall browse-url-secondary-browser-function + (browse-url-file-url tmp)))) +(defvar rlr/org-preview-css " +" + "Stylesheet injected into throwaway HTML previews of Org buffers.") + +(use-package javelin + :ensure t + :config + (global-javelin-minor-mode 1)) + (provide 'init) -- cgit v1.3.1