From 2ce96e56398b15b3d6165d81b5778247d8ec6224 Mon Sep 17 00:00:00 2001 From: rondDev Date: Thu, 19 Sep 2024 18:29:00 +0200 Subject: [PATCH] feat: add a few small bits --- config.el | 112 ------------- config.org | 242 ++++++++++++++++++++++++++++ init.el | 16 +- modules/lang/nu/config.el | 8 +- modules/lang/nu/packages.el | 9 +- packages.el | 10 ++ snippets/org-mode/Mermaid-Flowchart | 9 ++ snippets/org-mode/Mermaid-Sequence | 8 + themes/base16-eldritch-theme.el | 62 +++++++ themes/theme.el | 44 +++++ 10 files changed, 392 insertions(+), 128 deletions(-) delete mode 100644 config.el create mode 100644 config.org create mode 100644 snippets/org-mode/Mermaid-Flowchart create mode 100644 snippets/org-mode/Mermaid-Sequence create mode 100644 themes/base16-eldritch-theme.el create mode 100644 themes/theme.el diff --git a/config.el b/config.el deleted file mode 100644 index f75930d..0000000 --- a/config.el +++ /dev/null @@ -1,112 +0,0 @@ -;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- - -;; Place your private configuration here! Remember, you do not need to run 'doom -;; sync' after modifying this file! - - -;; Some functionality uses this to identify you, e.g. GPG configuration, email -;; clients, file templates and snippets. It is optional. -;; (setq user-full-name "John Doe" -;; user-mail-address "john@doe.com") - -;; Doom exposes five (optional) variables for controlling fonts in Doom: -;; -;; - `doom-font' -- the primary font to use -;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) -;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for -;; presentations or streaming. -;; - `doom-symbol-font' -- for symbols -;; - `doom-serif-font' -- for the `fixed-pitch-serif' face -;; -;; See 'C-h v doom-font' for documentation and more examples of what they -;; accept. For example: -;; -(setq doom-font (font-spec :family "JetbrainsMono Nerd Font" :size 12)) -;; -;; If you or Emacs can't find your font, use 'M-x describe-font' to look them -;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to -;; refresh your font settings. If Emacs still can't find your font, it likely -;; wasn't installed correctly. Font issues are rarely Doom issues! - -;; There are two ways to load a theme. Both assume the theme is installed and -;; available. You can either set `doom-theme' or manually load a theme with the -;; `load-theme' function. This is the default: -(setq doom-theme 'doom-one) - -;; This determines the style of line numbers in effect. If set to `nil', line -;; numbers are disabled. For relative line numbers, set this to `relative'. -(setq display-line-numbers-type 'relative) - -;; If you use `org' and don't want your org files in the default location below, -;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org/") - - -;; 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. -;; -;; (after! PACKAGE -;; (setq x y)) -;; -;; The exceptions to this rule: -;; -;; - Setting file/directory variables (like `org-directory') -;; - Setting variables which explicitly tell you to set them before their -;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). -;; - Setting doom variables (which start with 'doom-' or '+'). -;; -;; Here are some additional functions/macros that will help you configure Doom. -;; -;; - `load!' for loading external *.el files relative to this one -;; - `use-package!' for configuring packages -;; - `after!' for running code after a package has loaded -;; - `add-load-path!' for adding directories to the `load-path', relative to -;; this file. Emacs searches the `load-path' when you load packages with -;; `require' or `use-package'. -;; - `map!' for binding new keys -;; -;; To get information about any of these functions/macros, move the cursor over -;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). -;; This will open documentation for it, including demos of how they are used. -;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, -;; etc). -;; -;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how -;; they are implemented. -;; -(global-wakatime-mode) -(setq projectile-project-search-path '("~/external/" "~/internal/" ("~/projects" . 2))) -(setq evil-snipe-override-evil-repeat-keys nil) -(setq doom-localleader-key ",") - -(map! :after evil :nvm "H" #'evil-first-non-blank) -(map! :after evil :nvm "L" #'evil-end-of-line) - -(after! lsp-ui-sideline (setq lsp-ui-sideline-mode nil - lsp-ui-sideline-show-code-actions t) - (lsp-inlay-hints-mode)) - - - -(setq lsp-inlay-hint-enable t) -(setq-hook! 'lsp-ui-mode-hook - lsp-ui-sideline-enable nil - lsp-ui-sideline-mode nil) - - -(setq fancy-splash-image (concat doom-user-dir "vapor.png")) - -(setq +doom-dashboard-name "*dash*") -(setq wakatime-cli-path "/home/rond/.wakatime/wakatime-cli") - -(use-package! ewal - :init - (setq ewal-json-file "~/.config/wal/rond.json")) - -;; (load-theme 'base16-oxocarbon-dark t) -;; (load-theme 'doom-xcode t) - -(use-package! ewal-spacemacs-themes - :config (progn - (load-theme 'ewal-spacemacs-modern t) - (enable-theme 'ewal-spacemacs-modern))) diff --git a/config.org b/config.org new file mode 100644 index 0000000..0192fdf --- /dev/null +++ b/config.org @@ -0,0 +1,242 @@ +#+TITLE: Doom Config + +#+begin_src emacs-lisp + +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. It is optional. +;; (setq user-full-name "John Doe" +;; user-mail-address "john@doe.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom: +;; +;; - `doom-font' -- the primary font to use +;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) +;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; - `doom-symbol-font' -- for symbols +;; - `doom-serif-font' -- for the `fixed-pitch-serif' face +;; +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +(setq doom-font (font-spec :family "JetbrainsMono Nerd Font" :size 12)) +;; +;; If you or Emacs can't find your font, use 'M-x describe-font' to look them +;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to +;; refresh your font settings. If Emacs still can't find your font, it likely +;; wasn't installed correctly. Font issues are rarely Doom issues! + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +;; (setq doom-theme 'doom-one) + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type 'relative) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + + +;; 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. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, +;; etc). +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. +;; +(global-wakatime-mode) +(setq projectile-project-search-path '("~/external/" "~/internal/" ("~/projects" . 2))) +(setq evil-snipe-override-evil-repeat-keys nil) +(setq evil-kill-on-visual-paste nil) +(setq doom-localleader-key ",") + +;; (map! :after evil) +(map! :after evil + :nvm "L" #'evil-end-of-line + :nvm "H" #'evil-first-non-blank) +(map! :after evil :leader :nvm "s n" #'evil-ex-nohighlight) + +(after! lsp-ui-sideline (setq lsp-ui-sideline-mode nil + lsp-ui-sideline-show-code-actions t)) +;; (lsp-inlay-hints-mode)) + + + +;; (setq lsp-inlay-hint-enable t) +;; (setq-hook! 'lsp-ui-mode-hook +;; lsp-ui-sideline-enable nil +;; lsp-ui-sideline-mode nil) + +;; NOTE: I think this should disable vsync? +;; (add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) + + +(setq fancy-splash-image (concat doom-user-dir "vapor.png")) + +(setq +doom-dashboard-name "*dash*") +(setq wakatime-cli-path "/home/rond/.wakatime/wakatime-cli") + + +(after! elfeed + (setq elfeed-feeds '("http://nullprogram.com/feed/" + "http://hnrss.org/frontpage" + "http://hnrss.org/ask" + "http://hnrss.org/show" + "http://archlinux.org/feeds/releases/" + "https://github.com/void-linux/void-packages/commits/master.atom" + "http://xkcd.com/rss.xml" + "http://opensource.com/feed"))) + + +(setq user-mail-address "rkulleseid@gmail.com") +(after! mu4e + (setq mu4e-get-mail-command "mbsync -c ~/.config/mu4e/.mbsyncrc -a" + mu4e-update-interval 60 + mu4e-search-results-limit 10000)) + +(when (daemonp) + (exec-path-from-shell-initialize)) + +;;;###autoload +(defun rond/reload-ewal () + (interactive) + (ewal-load-colors) + (load-theme 'ewal-spacemacs-modern t)) + +(rond/reload-ewal) +;; (use-package! lsp-biome) + +;; (setq doom-modeline-buffer-file-name-style 'relative-to-project) +(setq doom-modeline-major-mode-icon t) +(setq doom-modeline-hud t) + +(setq mini-modeline-hide-mode-line nil) + +(setq mini-modeline-r-format + '("%e" mode-line-front-space + (:eval + (string-trim + (format-mode-line mode-line-modes))))) +(setq auth-sources '("~/.authinfo.gpg")) + + +(use-package! org-transclusion + :after org + :init + (map! + :map global-map "" #'org-transclusion-add + :leader + :prefix "n" + :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) + +(setq nlinum-mode t) + +(use-package! org-roam + :custom + (org-roam-directory (file-truename "~/org/roam"))) + +(defun spacemacs/rename-current-buffer-file () + "Renames current buffer and file it is visiting." + (interactive) + (let* ((name (buffer-name)) + (filename (buffer-file-name))) + (if (not (and filename (file-exists-p filename))) + (error "Buffer '%s' is not visiting a file!" name) + (let* ((dir (file-name-directory filename)) + (new-name (read-file-name "New name: " dir))) + (cond ((get-buffer new-name) + (error "A buffer named '%s' already exists!" new-name)) + (t + (let ((dir (file-name-directory new-name))) + (when (and (not (file-exists-p dir)) (yes-or-no-p (format "Create directory '%s'?" dir))) + (make-directory dir t))) + (rename-file filename new-name 1) + (rename-buffer new-name) + (set-visited-file-name new-name) + (set-buffer-modified-p nil) + (when (fboundp 'recentf-add-file) + (recentf-add-file new-name) + (recentf-remove-if-non-kept filename)) + (message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name)))))))) + +#+end_src + + +* Theme +** Ewal +#+begin_src emacs-lisp +(use-package! ewal) +;; :init +;; (setq ewal-json-file "~/.config/wal/rond.json")) + +;; (load-theme 'base16-oxocarbon-dark t) +;; (load-theme 'doom-xcode t) + +(use-package! ewal-spacemacs-themes + :config (progn + (load-theme 'ewal-spacemacs-modern t) + (enable-theme 'ewal-spacemacs-modern))) + +(use-package! ewal-evil-cursors + :after (ewal-spacemacs-themes) + :config (ewal-evil-cursors-get-colors + :apply t :spaceline t)) +#+end_src +** Eldritch Theme +Custom theme based on https://github.com/eldritch-theme by rond +#+begin_src emacs-lisp +(add-to-list 'custom-theme-load-path "~/.config/doom/themes") +#+end_src + +* Misc +** Org +#+begin_src elisp +(setq org-log-done 'time) +(setq org-log-into-drawer "LOGBOOK") +;; (setq org-log-state-notes-into-drawer t) +;; (defun rond/org-property-change-note (prop val) +;; "Add property changes to the logbook" +;; (when (equal prop "Note") +;; (org-add-log-setup 'state "%Some unknown previous value%" val 'property) +;; ) +;; ) +;; (add-hook! 'org-after-todo-state-change-hook 'rond/org-property-change-note) +(setq org-todo-keywords + '((sequence "TODO(t!)" "PROJ(p!)" "LOOP(r!)" "STRT(s!)" "WAIT(w!)" "HOLD(h!)" "IDEA(i!)" "|" "DONE(d!)" "KILL(k!)") + (sequence "[ ](T!)" "[-](S!)" "[?](W!)" "|" "[X](D!)") + (sequence "|" "OKAY(o!)" "YES(y!)" "NO(n!)"))) +#+end_src diff --git a/init.el b/init.el index de1b42a..612ff87 100644 --- a/init.el +++ b/init.el @@ -22,11 +22,11 @@ :completion ;;company ; the ultimate code completion backend - (corfu +orderless) ; complete with cap(f), cape and a flying feather! + (corfu +icons +orderless) ; complete with cap(f), cape and a flying feather! ;;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 @@ -48,7 +48,7 @@ unicode ; extended unicode support for various languages (vc-gutter +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB - ;;window-select ; visually switch windows + (window-select +numbers) ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing @@ -61,7 +61,7 @@ ;;lispy ; vim for lisp, for people who don't like vim multiple-cursors ; editing in many places at once ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of + parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates snippets ; my elves. They type so I don't have to word-wrap ; soft wrapping with language-aware indent @@ -96,7 +96,7 @@ (eval +overlay) ; run code, run (also, repls) lookup ; navigate your code and its documentation lsp ; M-x vscode - magit ; a git porcelain for Emacs + (magit +forge) ; a git porcelain for Emacs make ; run make tasks from Emacs ;;pass ; password manager for nerds pdf ; pdf enhancements @@ -153,7 +153,7 @@ nix ; I hereby declare "nix geht mehr!" nu ;;ocaml ; an objective camel - org ; organize your plain life in plain text + (org +contacts +dragndrop +crypt +jupyter +pretty +roam2) ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional @@ -187,8 +187,8 @@ ;;emms everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - ;;(rss +org) ; emacs as an RSS reader + (rss +org) ; emacs as an RSS reader :config - ;;literate + literate (default +bindings +smartparens)) diff --git a/modules/lang/nu/config.el b/modules/lang/nu/config.el index 3f72a36..9116dab 100644 --- a/modules/lang/nu/config.el +++ b/modules/lang/nu/config.el @@ -1,6 +1,6 @@ ;;; lang/nu/config.el -*- lexical-binding: t; -*- -(use-package! nushell-ts-mode - :init - (add-hook 'nushell-ts-mode-hook #'lsp! 'append)) -(use-package! nushell-ts-babel) +;; (use-package! nushell-ts-mode +;; :init +;; (add-hook 'nushell-ts-mode-hook #'lsp! 'append) +;; (use-package! nushell-ts-babel) diff --git a/modules/lang/nu/packages.el b/modules/lang/nu/packages.el index 521adb7..53ef440 100644 --- a/modules/lang/nu/packages.el +++ b/modules/lang/nu/packages.el @@ -1,7 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/nu/packages.el -(package! nushell-ts-mode - :recipe (:host github :repo "herbertjones/nushell-ts-mode")) -(package! nushell-ts-babel - :recipe (:host github :repo "herbertjones/nushell-ts-babel")) +(package! nushell-mode :recipe (:host github :repo "mrkkrp/nushell-mode")) +;; (package! nushell-ts-mode +;; :recipe (:host github :repo "herbertjones/nushell-ts-mode")) +;; (package! nushell-ts-babel +;; :recipe (:host github :repo "herbertjones/nushell-ts-babel")) diff --git a/packages.el b/packages.el index 3836281..c037dcc 100644 --- a/packages.el +++ b/packages.el @@ -56,3 +56,13 @@ (package! lsp-tailwindcss :recipe (:host github :repo "merrickluo/lsp-tailwindcss")) (package! ewal) (package! ewal-spacemacs-themes) +(package! ewal-evil-cursors) +(package! hnreader) +(package! exec-path-from-shell) +(package! ob-mermaid) +(package! lsp-biome :recipe (:host github :repo "cxa/lsp-biome")) +(package! ghub) +(package! mini-modeline) +(package! nlinum) +(package! org-transclusion) +(package! keycast) diff --git a/snippets/org-mode/Mermaid-Flowchart b/snippets/org-mode/Mermaid-Flowchart new file mode 100644 index 0000000..6c74a0b --- /dev/null +++ b/snippets/org-mode/Mermaid-Flowchart @@ -0,0 +1,9 @@ +# key: mermaid-Flow +# name: Mermaid-Flowchart +# -- +#+begin_src mermaid :file test.png +flowchart LR + ${0:a}---${1:b} + example[title in the box] + unicode["This ❤ Unicode"] +#+end_src \ No newline at end of file diff --git a/snippets/org-mode/Mermaid-Sequence b/snippets/org-mode/Mermaid-Sequence new file mode 100644 index 0000000..b49f434 --- /dev/null +++ b/snippets/org-mode/Mermaid-Sequence @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: Mermaid-Sequence +# key: mermaid-seq +# -- +#+begin_src mermaid :file test.png +sequenceDiagram + A-->B: Works! +#+end_src \ No newline at end of file diff --git a/themes/base16-eldritch-theme.el b/themes/base16-eldritch-theme.el new file mode 100644 index 0000000..81e0b19 --- /dev/null +++ b/themes/base16-eldritch-theme.el @@ -0,0 +1,62 @@ +;; base16-eldritch-theme.el -- A base16 colorscheme + +;;; Commentary: +;; Base16: (https://github.com/tinted-theming/home) + +;;; Authors: +;; Scheme: Jan T. Sott (http://github.com/idleberg) +;; Template: Kaleb Elwert + +;;; Code: + +(require 'base16-theme) + +(defvar base16-eldritch-theme-colors + '(:base00 "#212337" + :base01 "#292E42" + :base02 "#323449" + :base03 "#7081d0" + :base04 "#b5b2b2" + :base05 "#a48cf2" + :base06 "#ebfafa" + :base07 "#f7f7f7" + :base08 "#f265b5" + :base09 "#f16c75" + :base0A "#05e8fc" + :base0B "#f1fc79" + :base0C "#7081d0" + :base0D "#37f499" + :base0E "#04d1f9" + :base0F "#f1fc79") + "All colors for Base16 eldritch are defined here.") + + + ;; '(:base00 "#242137" + ;; :base01 "#22173b" + ;; :base02 "#32333d" + ;; :base03 "#7081d0" + ;; :base04 "#ebfafa" + ;; :base05 "#b5b2b2" + ;; :base06 "#ebfafa" + ;; :base07 "#f7f7f7" + ;; :base08 "#04d1f9" + ;; :base09 "#e8bbd0" + ;; :base0A "#f9515d" + ;; :base0B "#9071f4" + ;; :base0C "#f265b5" + ;; :base0D "#37f499" + ;; :base0E "#f16c75" + ;; :base0F "#f1fc79") + +;; Define the theme +(deftheme base16-eldritch) + +;; Add all the faces to the theme +(base16-theme-define 'base16-eldritch base16-eldritch-theme-colors) + +;; Mark the theme as provided +(provide-theme 'base16-eldritch) + +(provide 'base16-eldritch-theme) + +;;; base16-eldritch-theme.el ends here diff --git a/themes/theme.el b/themes/theme.el new file mode 100644 index 0000000..eb177ef --- /dev/null +++ b/themes/theme.el @@ -0,0 +1,44 @@ +;; base16-eldritch-theme.el -- A base16 colorscheme + +;;; Commentary: +;; Base16: (https://github.com/tinted-theming/home) + +;;; Authors: +;; Scheme: Jan T. Sott (http://github.com/idleberg) +;; Template: Kaleb Elwert + +;;; Code: + +(require 'base16-theme) + +(defvar base16-eldritch-theme-colors + '(:base00 "#212337" + :base01 "#21222c" + :base02 "#4a4543" + :base03 "#7081d0" + :base04 "#ebfafa" + :base05 "#a5a2a2" + :base06 "#ebfafa" + :base07 "#f7f7f7" + :base08 "#04d1f9" + :base09 "#e8bbd0" + :base0A "#f9515d" + :base0B "#9071f4" + :base0C "#f265b5" + :base0D "#37f499" + :base0E "#f16c75" + :base0F "#f1fc79") + "All colors for Base16 eldritch are defined here.") + +;; Define the theme +(deftheme base16-eldritch) + +;; Add all the faces to the theme +(base16-theme-define 'base16-eldritch base16-eldritch-theme-colors) + +;; Mark the theme as provided +(provide-theme 'base16-eldritch) + +(provide 'base16-eldritch-theme) + +;;; base16-3024-theme.el ends here