diff options
author | Thanos Apollo <[email protected]> | 2024-03-03 02:44:09 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-03-03 02:44:09 +0200 |
commit | c259c4e7b953f8f2f84297cdb5bbdf7371d0c7e8 (patch) | |
tree | 4963bd96fb8325becbeb83eb2402ca85fa28b48a | |
parent | ca8d4a400925d459ac7c538e9b0a27bb25eefbbd (diff) |
emacs: Fix org, update gnosis & enable double-space
-rw-r--r-- | .emacs.d/init.el | 186 |
1 files changed, 88 insertions, 98 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 95ca726..943fdda 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -37,9 +37,9 @@ (defvar is-phone (equal (system-name) "localhost")) (setf browse-url-browser-function 'browse-url-generic - browse-url-generic-program "nyxt" + browse-url-generic-program "firefox" backup-directory-alist '((".*" . "~/.Trash")) - sentence-end-double-space nil + sentence-end-double-space t default-input-method "bulgarian-phonetic") (define-key global-map (kbd "M-<backspace>") 'backward-kill-sexp) @@ -169,77 +169,8 @@ (menu-bar-mode -1) (global-hl-line-mode) -(use-package modus-themes - :straight t - :config - (setf modus-themes-italic-constructs t - modus-themes-bold-constructs nil - modus-themes-mixed-fonts nil - modus-themes-variable-pitch-ui nil - modus-themes-custom-auto-reload t - modus-themes-disable-other-themes t - modus-themes-prompts '(italic bold) - modus-themes-completions '((matches . (extrabold)) - (selection . (semibold italic text-also underline))) - modus-themes-org-blocks 'tinted-background) - ;; Palette overrides - (setf modus-themes-common-palette-overrides - '((fg-line-number-inactive "gray40") - (fg-line-number-active cyan-intense) - ;; (bg-main "#1d2021") ;;grubox-hard - (bg-main "#191919") ;; 1337 - ;; (bg-main "#1d1f21") ;; tomorrow night - ;; (bg-main "#171717") ;; badger - ;; (overline-heading-1 gold) - (fg-heading-1 red-warmer) - ;; (bg-heading-1 bg-blue-nuanced) - (bg-line-number-inactive unspecified) - (bg-line-number-active unspecified) - (bg-paren-match bg-magenta-intense) - (underline-paren-match fg-main) - (underline-err red-intense) - (underline-warning yellow-faint) - (underline-note cyan-faint) - (string "#86B187") - (border-mode-line-active unspecified) - (border-mode-line-inactive unspecified) - (bg-mode-line-active "#433F4f") ;; subtle lavender - (bg-mode-line-inactive "#1D1D1D") - ;; set fg from badger theme - (fg-mode-line-active "#F6F3E8") - (bg-hl-line bg-dim) - (cursor slate) - (prose-todo green-intense) - (prose-done bg-term-white) - (fg-prompt yellow-faint) - ,@modus-themes-preset-overrides-intense)) - ;; Headings - (setf modus-themes-headings - '((1 . (ultrabold 1.35)) - (2 . (semibold 1.2)) - (agenda-date . (1.3)) - (agenda-structure . (variable-pitch light 1.8)) - (t . (1.15)))) - ;; Load modus - (load-theme 'modus-vivendi t)) - -(use-package vertico - :ensure t - :config - (vertico-mode)) - -(use-package marginalia - :ensure t - :config - (marginalia-mode)) - -(use-package consult - :defer t - :bind (("C-x b" . 'consult-buffer) - ("C-c m" . 'consult-imenu))) - (use-package org - :defer t + :ensure t :config (setf org-directory "~/org/" org-agenda-files '("~/org/seminars.org" "~/org/lectures.org") @@ -250,16 +181,6 @@ org-table-convert-region-max-lines 20000 org-log-done 'time org-todo-keywords '((sequence "TODO(t)" "SEMINAR(s)" "LECTURE(l)" "DONE(d)"))) - - (defadvice org-edit-src-code (around set-buffer-file-name activate compile) - (let ((file-name (buffer-file-name))) - ad-do-it - (setf buffer-file-name file-name))) - - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t) - (python . t))) (setf org-structure-template-alist '(("e" . "src emacs-lisp") @@ -268,7 +189,7 @@ ("b" . "src bash") ("q" . "QUOTE"))) :hook ((org-mode . org-auto-tangle-mode) - (org-mode . (lambda () (display-line-numbers-mode -1)))) + (org-mode . (lambda () (display-line-numbers-mode -1) (flyspell-mode)))) :bind (:map org-mode-map (("C-c l" . org-store-link) ("C-c M-t" . org-todo)))) @@ -283,8 +204,9 @@ :ensure t :config (global-org-modern-mode) - (setf org-modern-table nil) - (setf org-modern-todo nil)) + (setf org-modern-table nil + org-modern-todo nil + org-modern-tag nil)) ;; Create notes directory for org-roam (unless (file-exists-p "~/Notes") @@ -305,7 +227,7 @@ (lambda () (not (or (member "journal" (org-get-tags)) (member "memorize" (org-get-tags)))))) - ;; Templaes + ;; Templates (setf org-roam-capture-templates '(("d" "default" plain "%?" @@ -327,6 +249,75 @@ ("C-c C-." . org-roam-tag-add) ("C-c i" . org-id-get-create))) +(use-package modus-themes + :straight t + :config + (setf modus-themes-italic-constructs t + modus-themes-bold-constructs nil + modus-themes-mixed-fonts nil + modus-themes-variable-pitch-ui nil + modus-themes-custom-auto-reload t + modus-themes-disable-other-themes t + modus-themes-prompts '(italic bold) + modus-themes-completions '((matches . (extrabold)) + (selection . (semibold italic text-also underline))) + modus-themes-org-blocks 'tinted-background) + ;; Palette overrides + (setf modus-themes-common-palette-overrides + '((fg-line-number-inactive "gray40") + (fg-line-number-active cyan-intense) + ;; (bg-main "#1d2021") ;;grubox-hard + (bg-main "#191919") ;; 1337 + ;; (bg-main "#1d1f21") ;; tomorrow night + ;; (bg-main "#171717") ;; badger + ;; (overline-heading-1 gold) + (fg-heading-1 red-warmer) + ;; (bg-heading-1 bg-blue-nuanced) + (bg-line-number-inactive unspecified) + (bg-line-number-active unspecified) + (bg-paren-match bg-magenta-intense) + (underline-paren-match fg-main) + (underline-err red-intense) + (underline-warning yellow-faint) + (underline-note cyan-faint) + (string "#86B187") + (border-mode-line-active unspecified) + (border-mode-line-inactive unspecified) + (bg-mode-line-active "#433F4f") ;; subtle lavender + (bg-mode-line-inactive "#1D1D1D") + ;; set fg from badger theme + (fg-mode-line-active "#F6F3E8") + (bg-hl-line bg-dim) + (cursor slate) + (prose-todo green-intense) + (prose-done bg-term-white) + (fg-prompt yellow-faint) + ,@modus-themes-preset-overrides-intense)) + ;; Headings + (setf modus-themes-headings + '((1 . (ultrabold 1.35)) + (2 . (semibold 1.2)) + (agenda-date . (1.3)) + (agenda-structure . (variable-pitch light 1.8)) + (t . (1.15)))) + ;; Load modus + (load-theme 'modus-vivendi t)) + +(use-package vertico + :ensure t + :config + (vertico-mode)) + +(use-package marginalia + :ensure t + :config + (marginalia-mode)) + +(use-package consult + :defer t + :bind (("C-x b" . 'consult-buffer) + ("C-c m" . 'consult-imenu))) + (use-package which-key :ensure t :config @@ -346,7 +337,7 @@ (use-package elfeed :defer t :config - (setf elfeed-search-filter "@1-week-ago +unread" + (setf elfeed-search-filter "@1-week-ago +unread -hackernoon" browse-url-browser-function #'browse-url-default-browser) ;; Feeds (setf elfeed-feeds @@ -506,7 +497,8 @@ :config (setq markdown-header-scaling t markdown-command "multimarkdown") - (add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))) + (add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode)) + :hook ((markdown-mode . flyspell-mode))) (use-package org-auto-tangle :defer t) @@ -519,7 +511,7 @@ (use-package sly :init (setf inferior-lisp-program "sbcl") - :defer) + :defer t) (use-package nov :defer t @@ -530,16 +522,12 @@ :defer t) (use-package emojify - :ensure t - :config - (global-emojify-mode) - (global-emojify-mode-line-mode)) + :ensure t) (use-package flycheck :ensure t :config - (setf flycheck-emacs-lisp-load-path 'inherit) - :hook ((org-src-mode . (lambda () (flycheck-disable-checker 'emacs-lisp-checkdoc))))) + (setf flycheck-emacs-lisp-load-path 'inherit)) ;; Shells (use-package vterm @@ -653,10 +641,12 @@ :defer t :init (define-prefix-command 'thanos/gnosis-map) :config - (setf gnosis-vc-auto-push t + (setf gnosis-vc-auto-push (when (or is-hermes + is-zeus) + t) gnosis-mcq-display-choices nil - gnosis-image-width (if is-hermes 150 nil) - gnosis-image-height (if is-hermes 150 nil)) + gnosis-image-width (if is-zeus 300 150) + gnosis-image-height (if is-zeus 300 150)) :bind (("C-r" . thanos/gnosis-map) :map thanos/gnosis-map ("r" . 'gnosis-review) |