diff --git a/.gitmodules b/.gitmodules index 381e9ce..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "dots/shell"] - path = dots/shell - url = git@github.com:caelestia-dots/shell.git diff --git a/dots/doom/.back.modules/completion/corfu/README.org b/dots/doom/.back.modules/completion/corfu/README.org deleted file mode 100755 index 60cb7ec..0000000 --- a/dots/doom/.back.modules/completion/corfu/README.org +++ /dev/null @@ -1,153 +0,0 @@ -#+title: :completion corfu -#+subtitle: Complete with cap(f), cape and a flying feather -#+created: September 9, 2022 -#+since: 3.0.0 (#7002) - -* Description :unfold: -This module provides code completion, powered by [[https://github.com/minad/corfu][corfu]]. - -It is recommended to enable either this or [[doom-module:][:completion company]], in case you -desire pre-configured auto-completion. Corfu is much lighter weight and focused, -plus it's built on native Emacs functionality, whereas company is heavy and -highly non-native, but has some extra features and more maturity. - -** Maintainers -- [[doom-user:][@LuigiPiucco]] - -[[doom-contrib-maintainer:][Become a maintainer?]] - -** Module flags -- +icons :: - Display icons beside completion suggestions. -- +tng :: - Invoke completion on [[kbd:][TAB]]. When corfu is active, [[kbd:][TAB]] and [[kbd:][S-TAB]] will navigate - the completion candidates. Arrow keys and evil-style movement are still - supported. - -** Packages -- [[doom-package:][corfu]] -- [[doom-package:][cape]] -- [[doom-package:][kind-icon]] if [[doom-module:][:completion corfu +icons]] -- [[doom-package:][corfu-terminal]] if [[doom-module:][:os tty]] - -** Hacks -/No hacks documented for this module./ - -** TODO Changelog -# This section will be machine generated. Don't edit it by hand. -/This module does not have a changelog yet./ - -* Installation -Enable this module in your ~doom!~ block. - -This module has no direct requirements, but some languages may have their own -requirements to fulfill before you get code completion in them (and some -languages may lack code completion support altogether). Run ~$ doom doctor~ to -find out if you're missing any dependencies. Note that corfu may have support -for completions in languages that have no development intelligence, since it -supports generic, context insensitive candidates such as file names or recurring -words. - -* TODO Usage -#+begin_quote - 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] -#+end_quote - -** Code completion -By default, completion gets triggered after typing 2 non-space consecutive -characters, or by means of the [[kbd:][C-SPC]] keybinding at any moment. While the popup -is visible, the following relevant keys are available: - -| Keybind | Description | -|----------+------------------------------------------------------| -| [[kbd:][]] | Go to next candidate | -| [[kbd:][]] | Go to previous candidate | -| [[kbd:][C-n]] | Go to next candidate | -| [[kbd:][C-p]] | Go to previous candidate | -| [[kbd:][C-j]] | (evil) Go to next candidate | -| [[kbd:][C-k]] | (evil) Go to previous candidate | -| [[kbd:][C-]] | Go to next doc line | -| [[kbd:][C-]] | Go to previous doc line | -| [[kbd:][C-S-n]] | Go to next doc line | -| [[kbd:][C-S-p]] | Go to previous doc line | -| [[kbd:][C-S-j]] | (evil) Go to next doc line | -| [[kbd:][C-S-k]] | (evil) Go to previous doc line | -| [[kbd:][C-h]] | Toggle documentation (if available) | -| [[kbd:][s-]] | Export to minibuffer (if [[doom-module:][:completion vertico]]) | -| [[kbd:][s-j]] | (evil) Export to minibuffer (if [[doom-module:][:completion vertico]]) | -| [[kbd:][RET]] | Insert candidate | -| [[kbd:][C-SPC]] | (when completing) Insert separator (see below) | -| [[kbd:][C-SPC]] | Complete (unless [[doom-module:][:completion corfu +tng]]) | - -If you prefer a [[kbd:][TAB]]-centric completion style, enable the [[doom-module:][:completion corfu +tng]] -flag so that, instead, you trigger completion with [[kbd:][TAB]], getting the following -additional binds: - -| Keybind | Description | -|---------+--------------------------------------------| -| [[kbd:][TAB]] | Complete | -| [[kbd:][TAB]] | (when completing) Go to next candidate | -| [[kbd:][S-TAB]] | (when completing) Go to previous candidate | - -** Searching with multiple keywords -If the [[doom-module:][:completion vertico]] module is enabled, users can perform code completion -with multiple search keywords by use of space as separator. More information can -be found [[https://github.com/oantolin/orderless#company][here]]. Pressing [[kdb:][C-SPC]] again while completing inserts a space as -separator. This allows searching with space-separated terms; each piece will -match individually and in any order, with smart casing. Pressing just [[kbd:][SPC]] acts -as normal and restarts completion, so that when typing sentences it doesn't try -to complete the whole sentence instead of just the word. - -Without [[doom-module:][:completion vertico]], it still works, just not as intelligently, due to -the lack of orderless. - -** Exporting to the minibuffer (requires [[doom-module:][:completion vertico]]) -When using the [[doom-module:][:completion vertico]] module, which pulls in the [[doom-package:][consult]] package, -the entries shown in the completion popup can be exported to a consult -minibuffer, giving access to all the manipulations the vertico suite allows. For -instance, one could use this to export with [[doom-package:][embark]] via [[kbd:][C-c C-l]] and get a buffer -with all candidates. - -** Ispell completion -Ispell completion is supported, so long as you point to the right ~.dic~ file in -~ispell-alternate-dictionary~. For selected text modes (see the configuration -section) it completes everywhere, for programming modes it can complete in -comments and strings. - -* Configuration -A few variables may be set to change behavior of this module: - -- +corfu-auto-delay :: - Number of seconds till completion occurs automatically. Defaults to 0.1. -- +corfu-auto-prefix :: - Number of characters till auto-completion starts to happen. Defaults to 2. -- +corfu-want-multi-component :: - Sets whether orderless-style matching should be supported with space as a - separator. -- +corfu-ispell-completion-modes :: - Lists modes in which to add ~cape-ispell~ as a capf. These show be majorly - text modes, else you will get lots of bad suggestions, since when this matches - it interrupts the flow of candidate selection. -- +corfu-ispell-in-comments-and-strings :: - Whether we should complete when point is inside a string or comment. If - non-nil, works as in a text mode, else gives programming completions just like - in the rest of the buffer. - -Additionally, if you prefer to never stop completion on [[kbd:][SPC]], add the following -to your ~config.el~: - -#+begin_src emacs-lisp -(map! :map corfu-map - :desc "insert separator" "C-SPC" #'corfu-insert-separator) -#+end_src - -* Troubleshooting -[[doom-report:][Report an issue?]] - -* Frequently asked questions -/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] - -* TODO Appendix -#+begin_quote - 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] -#+end_quote diff --git a/dots/doom/.back.modules/completion/corfu/config.el b/dots/doom/.back.modules/completion/corfu/config.el deleted file mode 100755 index e39a1bd..0000000 --- a/dots/doom/.back.modules/completion/corfu/config.el +++ /dev/null @@ -1,188 +0,0 @@ -;;; completion/corfu/config.el -*- lexical-binding: t; -*- - -(defvar +corfu-auto-delay 0.1 - "How long after point stands still will completion be called automatically, -in seconds. - -Setting `corfu-auto-delay' directly may not work, as it needs to be set *before* -enabling `corfu-mode'.") -(defvar +corfu-auto-prefix 2 - "How many characters should be typed before auto-complete starts to kick in. - -Setting `corfu-auto-prefix' directly may not work, as it needs to be set -*before* enabling `corfu-mode'.") -(defvar +corfu-want-multi-component t - "Enables multiple component search, with pieces separated by spaces. - -This allows search of non-contiguous unordered bits, for instance by typing -\"tear rip\" to match \"rip-and-tear\". Notice the space, it does not break -completion in this case.") -(defvar +corfu-icon-height 0.9 - "The height applied to the icons (it is passed to both svg-lib and kind-icon). - -It may need tweaking for the completions to not become cropped at the end. -Note that changes are applied only after a cache reset, via -`kind-icon-reset-cache'.") - -(defvar +corfu-ispell-completion-modes '(org-mode markdown-mode text-mode) - "Modes to enable ispell completion in. - -For completion in comments, see `+corfu-ispell-in-comments-and-strings'.") -(defvar +corfu-ispell-in-comments-and-strings t - "Enable completion with ispell inside comments when in a `prog-mode' -derivative.") - -;; -;;; Packages -(use-package! corfu - :hook (doom-first-buffer . global-corfu-mode) - :init - ;; Auto-completion settings, must be set before calling `global-corfu-mode'. - (setq corfu-auto t - corfu-auto-delay +corfu-auto-delay - corfu-auto-prefix +corfu-auto-prefix - corfu-excluded-modes '(erc-mode - circe-mode - help-mode - gud-mode - vterm-mode)) - - :config - (when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot))) - (add-hook 'lsp-mode-hook (defun doom--add-lsp-capf () - (add-to-list 'completion-at-point-functions (cape-capf-buster #'lsp-completion-at-point))) - ;; Below is so that context specific completions in cape come first. - :depth 1)) - (add-to-list 'completion-styles 'partial-completion t) - (add-to-list 'completion-styles 'initials t) - (setq corfu-cycle t - corfu-separator (when +corfu-want-multi-component ?\s) - corfu-preselect t - corfu-count 16 - corfu-max-width 120 - corfu-preview-current 'insert - corfu-quit-at-boundary (if +corfu-want-multi-component 'separator t) - corfu-quit-no-match (if +corfu-want-multi-component 'separator t) - ;; In the case of +tng, TAB should be smart regarding completion; - ;; However, it should otherwise behave like normal, whatever normal was. - tab-always-indent (if (modulep! +tng) 'complete tab-always-indent)) - ;; Only done with :tools vertico active due to orderless. Alternatively, we - ;; could set it up here if it's not there. - (when (and +corfu-want-multi-component (modulep! :completion vertico)) - (cond ((modulep! :tools lsp +eglot) (add-to-list 'completion-category-overrides '(eglot (styles orderless)))) - ((modulep! :tools lsp) (add-hook 'lsp-completion-mode-hook - (defun doom--use-orderless-lsp-capf () - (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) - '(orderless))))))) - (map! (:unless (modulep! +tng) - :desc "complete" "C-SPC" #'completion-at-point) - (:map 'corfu-map - (:when +corfu-want-multi-component - :desc "insert separator" "C-SPC" #'corfu-insert-separator) - (:when (modulep! :completion vertico) - :desc "move to minibuffer" "s-" #'corfu-move-to-minibuffer - (:when (modulep! :editor evil) - :desc "move to minibuffer" "s-j" #'corfu-move-to-minibuffer)) - (:when (modulep! +tng) - :desc "next" [tab] #'corfu-next - :desc "previous" [backtab] #'corfu-previous - :desc "next" "TAB" #'corfu-next - :desc "previous" "S-TAB" #'corfu-previous)))) - -;; Taken from corfu's README. -;; TODO: extend this to other completion front-ends, mainly helm and ido, since -;; ivy is being considered for removal. -(when (modulep! :completion vertico) - (defun corfu-move-to-minibuffer () - (interactive) - (let ((completion-extra-properties corfu--extra) - completion-cycle-threshold completion-cycling) - (apply #'consult-completion-in-region completion-in-region--data)))) - -(use-package! cape - :after corfu - :commands (cape-dabbrev - cape-file - cape-history - cape-keyword - cape-tex - cape-sgml - cape-rfc1345 - cape-abbrev - cape-ispell - cape-dict - cape-symbol - cape-line) - :init - (add-to-list 'completion-at-point-functions #'cape-file) - (when +corfu-ispell-in-comments-and-strings - (defalias 'corfu--ispell-in-comments-and-strings - (cape-super-capf (cape-capf-inside-comment #'cape-ispell) - (cape-capf-inside-string #'cape-ispell))) - (add-hook 'prog-mode-hook - (lambda () - (add-to-list 'completion-at-point-functions #'corfu--ispell-in-comments-and-strings)))) - (dolist (sym +corfu-ispell-completion-modes) - (add-hook (intern (concat (symbol-name sym) "-hook")) - (lambda () - (add-to-list 'completion-at-point-functions #'cape-ispell)))) - (add-hook! '(TeX-mode-hook LaTeX-mode-hook org-mode-hook) - (lambda () - (add-to-list 'completion-at-point-functions #'cape-tex t)) - :depth 2) - (add-hook! '(html-mode-hook +web-react-mode-hook typescript-tsx-mode-hook org-mode-hook markdown-mode-hook) - (lambda () - (add-to-list 'completion-at-point-functions #'cape-sgml t)) - :depth 2) - (add-to-list 'completion-at-point-functions #'cape-dabbrev) - (add-to-list 'completion-at-point-functions #'cape-keyword) - :config - ;; Enhances speed on large projects, for which many buffers may be open. - (setq cape-dabbrev-check-other-buffers nil)) - -(use-package! kind-icon - :when (modulep! +icons) - :commands kind-icon-margin-formatter - :init - (add-hook 'corfu-margin-formatters #'kind-icon-margin-formatter) - :config - (setq kind-icon-default-face 'corfu-default - kind-icon-blend-background t - kind-icon-blend-frac 0.2) - (plist-put kind-icon-default-style :height +corfu-icon-height) - (plist-put svg-lib-style-default :height +corfu-icon-height)) - -(use-package! corfu-terminal - :when (and (modulep! :os tty) (not (display-graphic-p))) - :hook (corfu-mode . corfu-terminal-mode)) - -(use-package! dabbrev - :config - (setq dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'"))) - -(setq read-extended-command-predicate - #'command-completion-default-include-p) - -;; -;;; Extensions -(use-package! corfu-history - :after savehist - :hook (corfu-mode . corfu-history-mode) - :config - (add-to-list 'savehist-additional-variables 'corfu-history)) -(use-package! corfu-popupinfo - :hook (corfu-mode . corfu-popupinfo-mode) - :config - (setq corfu-popupinfo-delay '(0.5 . 1.0)) - (map! (:map 'corfu-map - :desc "scroll info up" "C-" #'corfu-popupinfo-scroll-down - :desc "scroll info down" "C-" #'corfu-popupinfo-scroll-up - :desc "scroll info up" "C-S-p" #'corfu-popupinfo-scroll-down - :desc "scroll info down" "C-S-n" #'corfu-popupinfo-scroll-up - :desc "toggle info" "C-h" #'corfu-popupinfo-toggle) - (:map 'corfu-popupinfo-map - :when (modulep! :editor evil) - ;; Reversed because popupinfo assumes opposite of what feels intuitive - ;; with evil. - :desc "scroll info up" "C-S-k" #'corfu-popupinfo-scroll-down - :desc "scroll info down" "C-S-j" #'corfu-popupinfo-scroll-up))) diff --git a/dots/doom/.back.modules/completion/corfu/packages.el b/dots/doom/.back.modules/completion/corfu/packages.el deleted file mode 100755 index 3033340..0000000 --- a/dots/doom/.back.modules/completion/corfu/packages.el +++ /dev/null @@ -1,10 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; completion/corfu/packages.el - -(package! corfu :recipe (:files ("*.el" "extensions/*.el"))) -(package! cape) -(package! dabbrev) -(when (modulep! +icons) - (package! kind-icon)) -(when (modulep! :os tty) - (package! corfu-terminal)) diff --git a/dots/doom/.back.modules/tools/lsp2/+eglot.el b/dots/doom/.back.modules/tools/lsp2/+eglot.el deleted file mode 100755 index 48dc8c5..0000000 --- a/dots/doom/.back.modules/tools/lsp2/+eglot.el +++ /dev/null @@ -1,57 +0,0 @@ -;;; tools/lsp/+eglot.el -*- lexical-binding: t; -*- - -(use-package! eglot - :commands eglot eglot-ensure - :hook (eglot-managed-mode . +lsp-optimization-mode) - :init - (setq eglot-sync-connect 1 - eglot-connect-timeout 10 - eglot-autoshutdown t - eglot-send-changes-idle-time 0.5 - ;; NOTE We disable eglot-auto-display-help-buffer because :select t in - ;; its popup rule causes eglot to steal focus too often. - eglot-auto-display-help-buffer nil) - (when (modulep! :checkers syntax) - (setq eglot-stay-out-of '(flymake))) - - :config - (set-popup-rule! "^\\*eglot-help" :size 0.15 :quit t :select t) - (set-lookup-handlers! 'eglot--managed-mode - :definition #'xref-find-definitions - :references #'xref-find-references - :implementations #'eglot-find-implementation - :type-definition #'eglot-find-typeDefinition - :documentation #'+eglot-lookup-documentation) - - (add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 0)) - - (when (modulep! :checkers syntax) - (after! flycheck - (load! "autoload/flycheck-eglot"))) - - (defadvice! +lsp--defer-server-shutdown-a (fn &optional server) - "Defer server shutdown for a few seconds. -This gives the user a chance to open other project files before the server is -auto-killed (which is a potentially expensive process). It also prevents the -server getting expensively restarted when reverting buffers." - :around #'eglot--managed-mode - (letf! (defun eglot-shutdown (server) - (if (or (null +lsp-defer-shutdown) - (eq +lsp-defer-shutdown 0)) - (prog1 (funcall eglot-shutdown server) - (+lsp-optimization-mode -1)) - (run-at-time - (if (numberp +lsp-defer-shutdown) +lsp-defer-shutdown 3) - nil (lambda (server) - (unless (eglot--managed-buffers server) - (prog1 (funcall eglot-shutdown server) - (+lsp-optimization-mode -1)))) - server))) - (funcall fn server)))) - - -(use-package! consult-eglot - :defer t - :when (modulep! :completion vertico) - :init - (map! :map eglot-mode-map [remap xref-find-apropos] #'consult-eglot-symbols)) diff --git a/dots/doom/.back.modules/tools/lsp2/+lsp.el b/dots/doom/.back.modules/tools/lsp2/+lsp.el deleted file mode 100755 index c737399..0000000 --- a/dots/doom/.back.modules/tools/lsp2/+lsp.el +++ /dev/null @@ -1,193 +0,0 @@ -;;; tools/lsp/+lsp.el -*- lexical-binding: t; -*- - -(defvar +lsp-company-backends - (if (modulep! :editor snippets) - '(:separate company-capf company-yasnippet) - 'company-capf) - "The backends to prepend to `company-backends' in `lsp-mode' buffers. -Can be a list of backends; accepts any value `company-backends' accepts.") - - -;; -;;; Packages - -(use-package! lsp-mode - :commands lsp-install-server - :init - ;; Don't touch ~/.emacs.d, which could be purged without warning - (setq lsp-session-file (concat doom-cache-dir "lsp-session") - lsp-server-install-dir (concat doom-data-dir "lsp")) - ;; Don't auto-kill LSP server after last workspace buffer is killed, because I - ;; will do it for you, after `+lsp-defer-shutdown' seconds. - (setq lsp-keep-workspace-alive nil) - - ;; NOTE I tweak LSP's defaults in order to make its more expensive or imposing - ;; features opt-in. Some servers implement these poorly and, in most - ;; cases, it's safer to rely on Emacs' native mechanisms (eldoc vs - ;; lsp-ui-doc, open in popup vs sideline, etc). - - ;; Disable features that have great potential to be slow. - (setq lsp-enable-folding nil - lsp-enable-text-document-color nil) - ;; Reduce unexpected modifications to code - (setq lsp-enable-on-type-formatting nil) - ;; Make breadcrumbs opt-in; they're redundant with the modeline and imenu - (setq lsp-headerline-breadcrumb-enable nil) - - ;; Let doom bind the lsp keymap. - (when (modulep! :config default +bindings) - (setq lsp-keymap-prefix nil)) - - :config - (add-to-list 'doom-debug-variables 'lsp-log-io) - - (setq lsp-intelephense-storage-path (concat doom-data-dir "lsp-intelephense/") - lsp-vetur-global-snippets-dir - (expand-file-name - "vetur" (or (bound-and-true-p +snippets-dir) - (concat doom-user-dir "snippets/"))) - lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir) - lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir)) - - ;; REVIEW Remove this once this is fixed upstream. - (add-to-list 'lsp-client-packages 'lsp-racket) - - (add-hook! 'doom-escape-hook - (defun +lsp-signature-stop-maybe-h () - "Close the displayed `lsp-signature'." - (when lsp-signature-mode - (lsp-signature-stop) - t))) - - (set-popup-rule! "^\\*lsp-\\(help\\|install\\)" :size 0.35 :quit t :select t) - (set-lookup-handlers! 'lsp-mode - :definition #'+lsp-lookup-definition-handler - :references #'+lsp-lookup-references-handler - :documentation '(lsp-describe-thing-at-point :async t) - :implementations '(lsp-find-implementation :async t) - :type-definition #'lsp-find-type-definition) - - (defadvice! +lsp--respect-user-defined-checkers-a (fn &rest args) - "Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'." - :around #'lsp-diagnostics-flycheck-enable - (if flycheck-checker - (let ((old-checker flycheck-checker)) - (apply fn args) - (setq-local flycheck-checker old-checker)) - (apply fn args))) - - (add-hook! 'lsp-mode-hook #'+lsp-optimization-mode) - - (when (modulep! :completion company) - (add-hook! 'lsp-completion-mode-hook - (defun +lsp-init-company-backends-h () - (when lsp-completion-mode - (set (make-local-variable 'company-backends) - (cons +lsp-company-backends - (remove +lsp-company-backends - (remq 'company-capf company-backends)))))))) - - (defvar +lsp--deferred-shutdown-timer nil) - (defadvice! +lsp-defer-server-shutdown-a (fn &optional restart) - "Defer server shutdown for a few seconds. -This gives the user a chance to open other project files before the server is -auto-killed (which is a potentially expensive process). It also prevents the -server getting expensively restarted when reverting buffers." - :around #'lsp--shutdown-workspace - (if (or lsp-keep-workspace-alive - restart - (null +lsp-defer-shutdown) - (= +lsp-defer-shutdown 0)) - (prog1 (funcall fn restart) - (+lsp-optimization-mode -1)) - (when (timerp +lsp--deferred-shutdown-timer) - (cancel-timer +lsp--deferred-shutdown-timer)) - (setq +lsp--deferred-shutdown-timer - (run-at-time - (if (numberp +lsp-defer-shutdown) +lsp-defer-shutdown 3) - nil (lambda (workspace) - (with-lsp-workspace workspace - (unless (lsp--workspace-buffers workspace) - (let ((lsp-restart 'ignore)) - (funcall fn)) - (+lsp-optimization-mode -1)))) - lsp--cur-workspace)))) - - (when (modulep! :ui modeline +light) - (defvar-local lsp-modeline-icon nil) - - (add-hook! '(lsp-before-initialize-hook - lsp-after-initialize-hook - lsp-after-uninitialized-functions - lsp-before-open-hook - lsp-after-open-hook) - (defun +lsp-update-modeline (&rest _) - "Update modeline with lsp state." - (let* ((workspaces (lsp-workspaces)) - (face (if workspaces 'success 'warning)) - (label (if workspaces "LSP Connected" "LSP Disconnected"))) - (setq lsp-modeline-icon (concat - " " - (+modeline-format-icon 'faicon "rocket" "" face label -0.0575) - " ")) - (add-to-list 'global-mode-string - '(t (:eval lsp-modeline-icon))))))) - (when (modulep! :completion corfu) - (setq lsp-completion-provider :none) - (add-hook 'lsp-mode-hook #'lsp-completion-mode))) - -(use-package! lsp-ui - :hook (lsp-mode . lsp-ui-mode) - :init - (defadvice! +lsp--use-hook-instead-a (fn &rest args) - "Change `lsp--auto-configure' to not force `lsp-ui-mode' on us. Using a hook -instead is more sensible." - :around #'lsp--auto-configure - (letf! ((#'lsp-ui-mode #'ignore)) - (apply fn args))) - - :config - (when (modulep! +peek) - (set-lookup-handlers! 'lsp-ui-mode - :definition 'lsp-ui-peek-find-definitions - :implementations 'lsp-ui-peek-find-implementation - :references 'lsp-ui-peek-find-references - :async t)) - - (setq lsp-ui-peek-enable (modulep! +peek) - lsp-ui-doc-max-height 8 - lsp-ui-doc-max-width 72 ; 150 (default) is too wide - lsp-ui-doc-delay 0.75 ; 0.2 (default) is too naggy - lsp-ui-doc-show-with-mouse nil ; don't disappear on mouseover - lsp-ui-doc-position 'at-point - lsp-ui-sideline-ignore-duplicate t - ;; Don't show symbol definitions in the sideline. They are pretty noisy, - ;; and there is a bug preventing Flycheck errors from being shown (the - ;; errors flash briefly and then disappear). - lsp-ui-sideline-show-hover nil - ;; Re-enable icon scaling (it's disabled by default upstream for Emacs - ;; 26.x compatibility; see emacs-lsp/lsp-ui#573) - lsp-ui-sideline-actions-icon lsp-ui-sideline-actions-icon-default) - - (map! :map lsp-ui-peek-mode-map - "j" #'lsp-ui-peek--select-next - "k" #'lsp-ui-peek--select-prev - "C-k" #'lsp-ui-peek--select-prev-file - "C-j" #'lsp-ui-peek--select-next-file)) - - -(use-package! helm-lsp - :when (modulep! :completion helm) - :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) - - -(use-package! lsp-ivy - :when (modulep! :completion ivy) - :commands lsp-ivy-workspace-symbol lsp-ivy-global-workspace-symbol) - - -(use-package! consult-lsp - :defer t - :when (modulep! :completion vertico) - :init - (map! :map lsp-mode-map [remap xref-find-apropos] #'consult-lsp-symbols)) diff --git a/dots/doom/.back.modules/tools/lsp2/README.org b/dots/doom/.back.modules/tools/lsp2/README.org deleted file mode 100755 index cf8c3c1..0000000 --- a/dots/doom/.back.modules/tools/lsp2/README.org +++ /dev/null @@ -1,155 +0,0 @@ -#+title: :tools lsp -#+subtitle: M-x vscode -#+created: March 05, 2019 -#+since: 21.12.0 - -* Description :unfold: -This module integrates [[https://langserver.org/][language servers]] into Doom Emacs. They provide features -you'd expect from IDEs, like code completion, realtime linting, language-aware -[[doom-package:imenu]]/[[doom-package:xref]] integration, jump-to-definition/references support, and more. - -As of this writing, this is the state of LSP support in Doom Emacs: - -| Module | Major modes | Default language server | -|------------------+---------------------------------------------------------+---------------------------------------------------------------| -| [[doom-module::lang cc]] | c-mode, c++-mode, objc-mode | ccls, clangd | -| [[doom-module::lang clojure]] | clojure-mode | clojure-lsp | -| [[doom-module::lang csharp]] | csharp-mode | omnisharp | -| [[doom-module::lang elixir]] | elixir-mode | elixir-ls | -| [[doom-module::lang fsharp]] | fsharp-mode | Mono, .NET core | -| [[doom-module::lang go]] | go-mode | go-langserver | -| [[doom-module::lang haskell]] | haskell-mode | haskell-language-server | -| [[doom-module::lang java]] | java-mode | lsp-java | -| [[doom-module::lang javascript]] | js2-mode, rjsx-mode, typescript-mode | ts-ls, deno-ls | -| [[doom-module::lang julia]] | julia-mode | LanguageServer.jl | -| [[doom-module::lang ocaml]] | tuareg-mode | ocaml-language-server | -| [[doom-module::lang php]] | php-mode | php-language-server | -| [[doom-module::lang purescript]] | purescript-mode | purescript-language-server | -| [[doom-module::lang python]] | python-mode | lsp-python-ms | -| [[doom-module::lang ruby]] | ruby-mode | solargraph | -| [[doom-module::lang rust]] | rust-mode | rls | -| [[doom-module::lang scala]] | scala-mode | metals | -| [[doom-module::lang sh]] | sh-mode | bash-language-server | -| [[doom-module::lang swift]] | swift-mode | sourcekit | -| [[doom-module::lang web]] | web-mode, css-mode, scss-mode, sass-mode, less-css-mode | vscode-css-languageserver-bin, vscode-html-languageserver-bin | -| [[doom-module::lang zig]] | zig-mode | zls | - -** Maintainers -/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]] - -** Module flags -- +eglot :: - Use [[https://elpa.gnu.org/packages/eglot.html][Eglot]] instead of [[https://github.com/emacs-lsp/lsp-mode][LSP-mode]] to implement the LSP client in Emacs. -- +peek :: - Use ~lsp-ui-peek~ when looking up definitions and references with - functionality from the [[doom-module::tools lookup]] module. - -** Packages -- [[doom-package:lsp-mode]] -- [[doom-package:lsp-ui]] -- [[doom-package:lsp-ivy]] ([[doom-module::completion ivy]]) -- [[doom-package:helm-lsp]] ([[doom-module::completion helm]]) -- [[doom-package:consult-lsp]] ([[doom-module::completion vertico]]) -- [[doom-package:eglot]] - -** Hacks -/No hacks documented for this module./ - -** TODO Changelog -# This section will be machine generated. Don't edit it by hand. -/This module does not have a changelog yet./ - -* Installation -[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] - -To get LSP working, you'll need to do three things: - -1. Enable this module, -2. Install a language server appropriate for your targeted language(s). -3. Enable the [[doom-module:+lsp]] flag on the [[doom-module::lang]] modules you want to enable LSP support for. - -Different languages will need different language servers, some of which [[doom-package:lsp-mode]] -will prompt you to auto-install, but [[doom-package:eglot]] will not. - -A table that lists available language servers and how to install them can be -found [[https://emacs-lsp.github.io/lsp-mode/page/languages/][on the lsp-mode project README]]. The documentation of the module for your -targeted language will contain brief instructions as well. - -For eglot users, a list of [[https://github.com/joaotavora/eglot/blob/master/README.md#connecting-to-a-server][default servers supported is on Eglot's README]], -including instructions to register your own. - -* TODO Usage -#+begin_quote - 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] -#+end_quote - -** LSP-powered project search -Without the [[doom-module:+eglot]] flag, and when [[doom-module::completion ivy]], [[doom-module::completion helm]] or -[[doom-module::completion vertico]] is active, LSP is used to search a symbol indexed by the LSP -server: -| Keybind | Description | -|---------+-------------------------------------| -| [[kbd:][SPC c j]] | Jump to symbol in current workspace | -| [[kbd:][SPC c J]] | Jump to symbol in any workspace | - -** Differences between eglot and lsp-mode -The two projects are large and actively developed, so without writing a novel, -it can only be compared in (very) broad strokes: - -- [[doom-package:lsp-mode]] tends to be more featureful, beginner-friendly (e.g. offers to - install servers for you and has more [[https://emacs-lsp.github.io/lsp-mode][helpful documentation]]), and has a user - experience that feels familiar to modern editors/IDEs, but at the cost of - performance (at baseline) and complexity (it has more moving parts and - reinvents a number of wheels to achieve a slicker UI, like ~lsp-ui-peek~, - ~lsp-ui-sideline~, etc). - -- [[doom-package:eglot]] has fewer bells and whistles: it relies on built-in Emacs functionality - more (eldoc, xref, capf, project.el, etc), offers less pre-configuration for - you, and is more performant than lsp-mode (again, at baseline). It also works - with TRAMP out-of-the-box (lsp-mode needs some extra configuration). - -#+begin_quote - 💬 I recommend beginners use lsp-mode. More experienced users may also opt to - disable many of [[https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/][its inessential features]] to gain back some ground on - performance and complexity costs. -#+end_quote - -All that said, it's easy to switch between the two implementations by swapping -in/out the [[doom-module:+lsp]] or [[doom-module:+eglot]] flag when [[id:01cffea4-3329-45e2-a892-95a384ab2338][enabling this module]]. - -* TODO Configuration -#+begin_quote - 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] -#+end_quote - -** Turn off lsp-mode's intrusive features -Many users may not like how many UI elements that lsp-mode adds. They have [[https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/][some -excellent documentation]] outlining what these features are called and how to turn -them off. - -* Troubleshooting -[[doom-report:][Report an issue?]] - -** My language server is not found -Check the entry in the [[../../../docs/faq.org][FAQ]] about "Doom can't find my executables/doesn't inherit -the correct ~PATH~" - -** LSP/Eglot is not started automatically in my buffer -Make sure that you have enabled the [[doom-module:+lsp]] flag on the appropriate module(s) (in -your ~doom!~ block in =$DOOMDIR/init.el=): -#+begin_src diff -:lang --python -+(python +lsp) -#+end_src - -** LSP is slow -Follow [[https://emacs-lsp.github.io/lsp-mode/page/performance/#tuning][lsp-tuning-guide]] to further fine-tune LSP mode performance. - -* Frequently asked questions -/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] - -* TODO Appendix -#+begin_quote - 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] -#+end_quote diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/common.el b/dots/doom/.back.modules/tools/lsp2/autoload/common.el deleted file mode 100755 index d91f3d2..0000000 --- a/dots/doom/.back.modules/tools/lsp2/autoload/common.el +++ /dev/null @@ -1,10 +0,0 @@ -;;; tools/lsp/autoload/common.el -*- lexical-binding: t; -*- - -;;;###autodef (fset 'lsp! #'ignore) -(defun lsp! () - "Dispatch to call the currently used lsp client entrypoint" - (interactive) - (if (modulep! +eglot) - (eglot-ensure) - (unless (bound-and-true-p lsp-mode) - (lsp-deferred)))) diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el b/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el deleted file mode 100755 index 7f23666..0000000 --- a/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el +++ /dev/null @@ -1,39 +0,0 @@ -;;; tools/lsp/autoload/eglot.el -*- lexical-binding: t; -*- -;;;###if (modulep! +eglot) - -;;;###autodef -(defun set-eglot-client! (mode server-call) - "Add SERVER-CALL list as a possible lsp server for given major MODE. - -Example : (set-eglot-client! 'python-mode `(,(concat doom-data-dir \"lsp/mspyls/Microsoft.Python.LanguageServer\")))" - (after! eglot - (add-to-list 'eglot-server-programs `(,mode . ,server-call)))) - -;; HACK Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a -;; more problematic approach of deferred to eldoc. Here, I've restored it. -;; Doom's lookup handlers try to open documentation in a separate window -;; (so they can be copied or kept open), but doing so with an eldoc buffer -;; is difficult because a) its contents are generated asynchronously, -;; making them tough to scrape, and b) their contents change frequently -;; (every time you move your cursor). -(defvar +eglot--help-buffer nil) -;;;###autoload -(defun +eglot-lookup-documentation (_identifier) - "Request documentation for the thing at point." - (eglot--dbind ((Hover) contents range) - (jsonrpc-request (eglot--current-server-or-lose) :textDocument/hover - (eglot--TextDocumentPositionParams)) - (let ((blurb (and (not (seq-empty-p contents)) - (eglot--hover-info contents range))) - (hint (thing-at-point 'symbol))) - (if blurb - (with-current-buffer - (or (and (buffer-live-p +eglot--help-buffer) - +eglot--help-buffer) - (setq +eglot--help-buffer (generate-new-buffer "*eglot-help*"))) - (with-help-window (current-buffer) - (rename-buffer (format "*eglot-help for %s*" hint)) - (with-current-buffer standard-output (insert blurb)) - (setq-local nobreak-char-display nil))) - (display-local-help)))) - 'deferred) diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el b/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el deleted file mode 100755 index c0568f5..0000000 --- a/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el +++ /dev/null @@ -1,76 +0,0 @@ -;;; flycheck-eglot --- Hacky eglot support in flycheck -*- lexical-binding: t; -*- -;;; Commentary: -;; This file sets up flycheck so that, when eglot receives a publishDiagnostics method -;; from the server, flycheck updates the reports. -;; -;; Thanks to: -;; - joaotavora for adding a handle to plug flycheck, and -;; - purcell for finding out the initial stub and the current implementation -;; -;; It works by creating a bridge function which can be used as the argument of -;; `eglot-flymake-backend', which both consumes diagnostics and queue a call to -;; 'flycheck-buffer' -;; -;;; Code: - -(defvar-local +lsp--flycheck-eglot--current-errors nil) - -(defun +lsp--flycheck-eglot-init (checker callback) - "CHECKER is the checker (eglot). -CALLBACK is the function that we need to call when we are done, on all the errors." - (eglot-flymake-backend #'+lsp--flycheck-eglot--on-diagnostics) - (funcall callback 'finished +lsp--flycheck-eglot--current-errors)) - -(defun +lsp--flycheck-eglot--on-diagnostics (diags &rest _) - (cl-labels - ((flymake-diag->flycheck-err - (diag) - (with-current-buffer (flymake--diag-buffer diag) - (flycheck-error-new-at-pos - (flymake--diag-beg diag) - (pcase (flymake--diag-type diag) - ('eglot-note 'info) - ('eglot-warning 'warning) - ('eglot-error 'error) - (_ (error "Unknown diagnostic type, %S" diag))) - (flymake--diag-text diag) - :end-pos (flymake--diag-end diag) - :checker 'eglot - :buffer (current-buffer) - :filename (buffer-file-name))))) - (setq +lsp--flycheck-eglot--current-errors - (mapcar #'flymake-diag->flycheck-err diags)) - ;; Call Flycheck to update the diagnostics annotations - (flycheck-buffer-deferred))) - -(defun +lsp--flycheck-eglot-available-p () - (bound-and-true-p eglot--managed-mode)) - -(flycheck-define-generic-checker 'eglot - "Report `eglot' diagnostics using `flycheck'." - :start #'+lsp--flycheck-eglot-init - :predicate #'+lsp--flycheck-eglot-available-p - :modes '(prog-mode text-mode)) - -(push 'eglot flycheck-checkers) - -(add-hook! 'eglot-managed-mode-hook - (defun +lsp-eglot-prefer-flycheck-h () - (when eglot--managed-mode - (flymake-mode -1) - (when-let ((current-checker (flycheck-get-checker-for-buffer))) - (unless (equal current-checker 'eglot) - (flycheck-add-next-checker 'eglot current-checker))) - (flycheck-add-mode 'eglot major-mode) - (flycheck-mode 1) - ;; Call flycheck on initilization to make sure to display initial - ;; errors - (flycheck-buffer-deferred)))) - -(after! flymake - (when (and - (not (fboundp 'flymake--diag-buffer)) - (fboundp 'flymake--diag-locus)) - (defalias 'flymake--diag-buffer 'flymake--diag-locus))) - -;;; flycheck-eglot.el ends here diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el b/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el deleted file mode 100755 index d769a26..0000000 --- a/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el +++ /dev/null @@ -1,75 +0,0 @@ -;;; tools/lsp/autoload/lsp-mode.el -*- lexical-binding: t; -*- -;;;###if (not (modulep! +eglot)) - -;;;###autodef -(defun set-lsp-priority! (client priority) - "Change the PRIORITY of lsp CLIENT." - (require 'lsp-mode) - (if-let (client (gethash client lsp-clients)) - (setf (lsp--client-priority client) - priority) - (error "No LSP client named %S" client))) - -;;;###autoload -(defun +lsp/uninstall-server (dir) - "Delete a LSP server from `lsp-server-install-dir'." - (interactive - (list (read-directory-name "Uninstall LSP server: " lsp-server-install-dir nil t))) - (unless (file-directory-p dir) - (user-error "Couldn't find %S directory" dir)) - (delete-directory dir 'recursive) - (message "Uninstalled %S" (file-name-nondirectory dir))) - -;;;###autoload -(defun +lsp/switch-client (client) - "Switch to another LSP server." - (interactive - (progn - (require 'lsp-mode) - (list (completing-read - "Select server: " - (or (mapcar #'lsp--client-server-id (lsp--filter-clients (-andfn #'lsp--supports-buffer? - #'lsp--server-binary-present?))) - (user-error "No available LSP clients for %S" major-mode)))))) - (require 'lsp-mode) - (let* ((client (if (symbolp client) client (intern client))) - (match (car (lsp--filter-clients (lambda (c) (eq (lsp--client-server-id c) client))))) - (workspaces (lsp-workspaces))) - (unless match - (user-error "Couldn't find an LSP client named %S" client)) - (let ((old-priority (lsp--client-priority match))) - (setf (lsp--client-priority match) 9999) - (unwind-protect - (if workspaces - (lsp-workspace-restart - (if (cdr workspaces) - (lsp--completing-read "Select server: " - workspaces - 'lsp--workspace-print - nil t) - (car workspaces))) - (lsp-mode +1)) - (add-transient-hook! 'lsp-after-initialize-hook - (setf (lsp--client-priority match) old-priority)))))) - -;;;###autoload -(defun +lsp-lookup-definition-handler () - "Find definition of the symbol at point using LSP." - (interactive) - (when-let (loc (lsp-request "textDocument/definition" - (lsp--text-document-position-params))) - (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil nil) - 'deferred)) - -;;;###autoload -(defun +lsp-lookup-references-handler (&optional include-declaration) - "Find project-wide references of the symbol at point using LSP." - (interactive "P") - (when-let - (loc (lsp-request "textDocument/references" - (append (lsp--text-document-position-params) - (list - :context `(:includeDeclaration - ,(lsp-json-bool include-declaration)))))) - (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil t) - 'deferred)) diff --git a/dots/doom/.back.modules/tools/lsp2/config.el b/dots/doom/.back.modules/tools/lsp2/config.el deleted file mode 100755 index cc64003..0000000 --- a/dots/doom/.back.modules/tools/lsp2/config.el +++ /dev/null @@ -1,47 +0,0 @@ -;;; tools/lsp/config.el -*- lexical-binding: t; -*- - -(defvar +lsp-defer-shutdown 3 - "If non-nil, defer shutdown of LSP servers for this many seconds after last -workspace buffer is closed. - -This delay prevents premature server shutdown when a user still intends on -working on that project after closing the last buffer, or when programmatically -killing and opening many LSP/eglot-powered buffers.") - - -;; -;;; Common - -(defvar +lsp--default-read-process-output-max nil) -(defvar +lsp--default-gcmh-high-cons-threshold nil) -(defvar +lsp--optimization-init-p nil) - -(define-minor-mode +lsp-optimization-mode - "Deploys universal GC and IPC optimizations for `lsp-mode' and `eglot'." - :global t - :init-value nil - (if (not +lsp-optimization-mode) - (setq-default read-process-output-max +lsp--default-read-process-output-max - gcmh-high-cons-threshold +lsp--default-gcmh-high-cons-threshold - +lsp--optimization-init-p nil) - ;; Only apply these settings once! - (unless +lsp--optimization-init-p - (setq +lsp--default-read-process-output-max (default-value 'read-process-output-max) - +lsp--default-gcmh-high-cons-threshold (default-value 'gcmh-high-cons-threshold)) - (setq-default read-process-output-max (* 1024 1024)) - ;; REVIEW LSP causes a lot of allocations, with or without the native JSON - ;; library, so we up the GC threshold to stave off GC-induced - ;; slowdowns/freezes. Doom uses `gcmh' to enforce its GC strategy, - ;; so we modify its variables rather than `gc-cons-threshold' - ;; directly. - (setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold)) - (gcmh-set-high-threshold) - (setq +lsp--optimization-init-p t)))) - - -;; -;;; Implementations - -(if (modulep! +eglot) - (load! "+eglot") - (load! "+lsp")) diff --git a/dots/doom/.back.modules/tools/lsp2/doctor.el b/dots/doom/.back.modules/tools/lsp2/doctor.el deleted file mode 100755 index 1739bfd..0000000 --- a/dots/doom/.back.modules/tools/lsp2/doctor.el +++ /dev/null @@ -1,9 +0,0 @@ -;;; tools/lsp/doctor.el -*- lexical-binding: t; -*- - -(assert! (not (and (modulep! +eglot) - (modulep! +peek))) - "+eglot and +peek flags are not compatible. Peek uses lsp-mode, while Eglot is another package altogether for LSP.") - -(unless (executable-find "npm") - (warn! "Couldn't find npm, most server installers won't work and will have to be installed manually. -For more information, see https://emacs-lsp.github.io/lsp-mode/page/languages/.")) diff --git a/dots/doom/.back.modules/tools/lsp2/packages.el b/dots/doom/.back.modules/tools/lsp2/packages.el deleted file mode 100755 index bcc0e81..0000000 --- a/dots/doom/.back.modules/tools/lsp2/packages.el +++ /dev/null @@ -1,16 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; tools/lsp/packages.el - -(if (modulep! +eglot) - (progn - (package! eglot :pin "e501275e06952889056268dabe08ccd0dbaf23e5") - (when (modulep! :completion vertico) - (package! consult-eglot :pin "0da8801dd8435160ce1f62ad8066bd52e38f5cbd"))) - (package! lsp-mode :pin "a3b3c15359405f442fc51a2db09e503ca3b39f3d") - (package! lsp-ui :pin "3cd7cc61273341023b863dcf45906ac9142fd1aa") - (when (modulep! :completion ivy) - (package! lsp-ivy :pin "9ecf4dd9b1207109802bd1882aa621eb1c385106")) - (when (modulep! :completion helm) - (package! helm-lsp :pin "c2c6974dadfac459b1a69a1217441283874cea92")) - (when (modulep! :completion vertico) - (package! consult-lsp :pin "58b541476203fa68e9e7682531f2a10e11780857"))) diff --git a/dots/doom/asm-ref.pdf b/dots/doom/asm-ref.pdf deleted file mode 100755 index 90fc407..0000000 Binary files a/dots/doom/asm-ref.pdf and /dev/null differ diff --git a/dots/doom/config.el b/dots/doom/config.el old mode 100755 new mode 100644 index 5b115b0..9746b74 --- a/dots/doom/config.el +++ b/dots/doom/config.el @@ -5,250 +5,58 @@ ;; Some functionality uses this to identify you, e.g. GPG configuration, email -;; clients, file templates and snippets. -(setq user-full-name "Zastian Pretorius" - user-mail-address "Zastian00@gmail.com") +;; 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. Here -;; are the three important ones: +;; Doom exposes five (optional) variables for controlling fonts in Doom: ;; -;; + `doom-font' -;; + `doom-variable-pitch-font' -;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; - `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 ;; -;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd -;; font string. You generally only need these two: -;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) -;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) +;; +;; 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: -;;(add-to-list 'load-path "~/.config/doom/themes") -(setq doom-theme 'doom-dracula) - +(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 t) ;; 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/") -(add-to-list 'load-path "~/.config/doom/lisp") - - -;; 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) - -;; scroll one line at a time (less "jumpy" than defaults) -(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time -(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling -(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse -(setq scroll-step 1) ;; keyboard scroll one line at a time -(setq auto-window-vscroll nil) - -(set-fontset-font "fontset-default" nil (font-spec :size 17 :name "ZedMono Nerd Font")) - -(setq doom-font (font-spec :family "Illusion Z" :size 17) - doom-variable-pitch-font (font-spec :family "Illusion Z" :size 17) - doom-big-font (font-spec :family "Illusion Z" :size 24)) - -(require 'whitespace) -(setq whitespace-line-column 99) -(setq whitespace-style '(face lines-tail)) -(add-hook 'prog-mode-hook 'whitespace-mode) - -(require 'fill-column-indicator) -(setq fci-rule-column 99) -(setq fci-rule-width 1) -(setq fci-rule-color "#a280d5") -(add-hook 'prog-mode-hook 'fci-mode) - -;; tab width -(setq-default tab-width 4) ;; Set tab width to 2 spaces -(setq-default indent-tabs-mode nil) ;; Use spaces instead of tabs -(add-hook 'prog-mode-hook - (lambda () - (setq-local tab-width 4) - (setq-local indent-tabs-mode nil))) -(setq lisp-indent-offset 4) -(use-package nix-mode - :mode "\\.nix\\'" - :config - (setq nix-indent-function (lambda (_) 4))) - -(setq rust-indent-offset 4) - - - - - -(custom-set-faces - '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) - '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) - '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) - '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) - '(org-level-5 ((t (:inherit outline-5 :height 1.0))))) - - -;; company mode delay 0 -(setq company-idle-delay 0) - - - - -;;japanese stuff -(setq default-input-method "japanese") - - - -(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu) -(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer) -(add-hook! '+doom-dashboard-functions :append - (insert "\n" (+doom-dashboard--center +doom-dashboard--width "The UwU Editor"))) - +;; 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: ;; -(setq org-image-actual-width 300) - -(setq fancy-splash-image (concat doom-user-dir "xenia.png")) - -(setq ess-r--no-company-meta t) - -(set-frame-parameter nil 'alpha-background 90) ; For current frame -(add-to-list 'default-frame-alist '(alpha-background . 90)) ; For all new frames henceforth -(add-to-list 'default-frame-alist '(undecorated . t)) - - - - ;undo fix -(setq undo-tree-enable-undo-in-region nil) -(setq undo-limit 8000000000) - - -(org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t) - (julia . t) - (python . t) - (jupyter . t))) - -;; accept completion from copilot and fallback to company -(defun my-tab () - (interactive) - (or (copilot-accept-completion) - (company-indent-or-complete-common nil))) - - -(use-package! copilot - :hook (prog-mode . copilot-mode) - :bind (("C-TAB" . 'copilot-accept-completion-by-word) - ("C-" . 'copilot-accept-completion-by-word) - :map company-active-map - ("" . 'my-tab) - ("TAB" . 'my-tab) - :map company-mode-map - ("" . 'my-tab) - ("TAB" . 'my-tab))) -(setq copilot-log-max 1000) - -;; asm stuff -(use-package! nasm-mode - :mode "\\.[n]*\\(asm\\|s\\)\\'") - -;; Get Haxor VM from https://github.com/krzysztof-magosa/haxor -(use-package! haxor-mode - :mode "\\.hax\\'") - -(use-package! mips-mode - :mode "\\.mips\\'") - -(use-package! riscv-mode - :mode "\\.riscv\\'") - -(use-package x86-lookup - :ensure t - :config - (setq x86-lookup-pdf "~/.config/doom/asm-ref.pdf")) - -(setq openai-key (getenv "OPENAIKEY")) -(setq chatgpt-input-method 'minibuffer) - - - -;;discord rich presence -;;(require 'elcord) -;;(add-hook 'doom-switch-buffer-hook -;; (lambda () -;; (if (string= (buffer-name) "*doom*") -;; (elcord-mode -1) -;; (elcord-mode 1)))) +;; - 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 '+'). ;; -;;(defun elcord--disable-elcord-if-no-frames (f) -;; (declare (ignore f)) -;; (when (let ((frames (delete f (visible-frame-list)))) -;; (or (null frames) -;; (and (null (cdr frames)) -;; (eq (car frames) terminal-frame)))) -;; (elcord-mode -1) -;; (add-hook 'after-make-frame-functions 'elcord--enable-on-frame-created))) -;; -;;(defun elcord--enable-on-frame-created (f) -;; (declare (ignore f)) -;; (elcord-mode +1)) -;; -;;(defun my/elcord-mode-hook () -;; (if elcord-mode -;; (add-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames) -;; (remove-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames))) -;; -;;(add-hook 'elcord-mode-hook 'my/elcord-mode-hook) -;; -;;(setq elcord-idle-message "Out doing your mom") - - -;; add my_stuff.el here and load it -(load! "my_stuff.el") - - -;;ollama stuff -;; -;;(use-package ellama -;; :init -;; ;; setup key bindings -;; (setopt ellama-keymap-prefix "C-c e") -;; ;; language you want ellama to translate to -;; (setopt ellama-language "English") -;; ;; could be llm-openai for example -;; (require 'llm-ollama) -;; (setopt ellama-provider -;; (make-llm-ollama -;; ;; this model should be pulled to use it -;; ;; value should be the same as you print in terminal during pull -;; :chat-model "codellama:13b" -;; :embedding-model "codellama:13b")) -;; ) -;;(use-package qml-ts-mode -;; :after lsp-mode -;; :config -;; (add-to-list 'lsp-language-id-configuration '(qml-ts-mode . "qml-ts")) -;; (lsp-register-client -;; (make-lsp-client :new-connection (lsp-stdio-connection '("qmlls", "-E")) -;; :activation-fn (lsp-activate-on "qml-ts") -;; :server-id 'qmlls)) -;; (add-hook 'qml-ts-mode-hook (lambda () -;; (setq-local electric-indent-chars '(?\n ?\( ?\) ?{ ?} ?\[ ?\] ?\; ?,)) -;; (lsp-deferred)))) - - -;; custom functions - - - -;; Here are some additional functions/macros that could help you configure Doom: +;; 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 @@ -261,6 +69,8 @@ ;; 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. diff --git a/dots/doom/custom.el b/dots/doom/custom.el deleted file mode 100755 index 9d2702c..0000000 --- a/dots/doom/custom.el +++ /dev/null @@ -1,24 +0,0 @@ -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(elfeed-feeds '("https://www.reddit.com/r/pcmasterrace/rss")) - '(warning-suppress-log-types '((initialization))) - '(warning-suppress-types - '((lsp-mode) - (lsp-mode) - (lsp-mode) - (lsp-mode) - (initialization) - (initialization)))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) - '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) - '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) - '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) - '(org-level-5 ((t (:inherit outline-5 :height 1.0))))) diff --git a/dots/doom/init.el b/dots/doom/init.el old mode 100755 new mode 100644 index 8c112db..44f9151 --- a/dots/doom/init.el +++ b/dots/doom/init.el @@ -4,8 +4,8 @@ ;; in. Remember to run 'doom sync' after modifying it! ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find a "Module Index" link where you'll find -;; a comprehensive list of Doom's modules and what flags they support. +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or ;; 'C-c c k' for non-vim users) to view its documentation. This works on @@ -15,17 +15,18 @@ ;; directory (for easy access to its source code). (doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh ;;chinese - japanese + ;;japanese ;;layout ; auie,ctsrnm is the superior home row :completion - ;;(corfu +icons +orderless) ; the even more ultimate completion backend - (company +icons +childframe) ; the ultimate code completion backend - ;;(helm +fuzzy) ; the *other* search engine for love and life + ;;company ; the ultimate code completion backend + (corfu +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 +fuzzy) ; a search engine for love and life - (vertico +icons) ; the search engine of the future + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future :ui ;;deft ; notational velocity for Emacs @@ -34,19 +35,19 @@ doom-quit ; DOOM quit-message prompts when you quit Emacs (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - indent-guides ; highlighted indent columns - ;;(ligatures +hasklig) ; ligatures and symbols to make your code pretty again - minimap ; show a map of the code on the side + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side modeline ; snazzy, Atom-inspired modeline, plus API - nav-flash ; blink cursor line after big motions + ;;nav-flash ; blink cursor line after big motions ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows + smooth-scroll ; So smooth you won't believe it's not butter ;;tabs ; a tab bar for Emacs - treemacs ; a project drawer, like neotree but cooler - unicode ; extended unicode support for various languages - vc-gutter ; vcs diff in the fringe + ;;treemacs ; a project drawer, like neotree but cooler + ;;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 workspaces ; tab emulation, persistence & separate workspaces @@ -56,7 +57,7 @@ (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - (format +onsave) ; automated prettiness + ;;(format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim ;;multiple-cursors ; editing in many places at once @@ -67,9 +68,10 @@ ;;word-wrap ; soft wrapping with language-aware indent :emacs - (dired +icons) ; making dired pretty [functional] + dired ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent - ;;ibuffer ; interactive buffer management + ;;eww ; the internet is gross + ;;ibuffer ; interactive buffer management undo ; persistent, smarter undo for your inevitable mistakes vc ; version-control and Emacs, sitting in a tree @@ -86,84 +88,85 @@ :tools ;;ansible - collab + biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends 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 - ;;biblio ; Writes a PhD for you (citation needed) + ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists lookup ; navigate your code and its documentation + ;;llm ; when I said you needed friends, I didn't mean... lsp ; M-x vscode - ;;lsp2 ; my custom one magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux + tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp :os - (:if IS-MAC macos) ; improve compatibility with macOS + (:if (featurep :system 'macos) macos) ; improve compatibility with macOS ;;tty ; improve the terminal Emacs experience :lang ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP - (cc +lsp) ; C > C++ == 1 + (cc +lsp) ; C > C++ == 1 ;;clojure ; java with a lisp - common-lisp ; if you've seen one lisp, you've seen them all + ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c - (csharp +lsp) ; unity, .NET, and mono shenanigans + csharp ; unity, .NET, and mono shenanigans ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else + (dart +flutter) ; paint ui and not much else ;;dhall ;;elixir ; erlang done right ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses + emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age ;;ess ; emacs speaks statistics ;;factor ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 - (gdscript +lsp) ; the language you waited for + ;;gdscript ; the language you waited for (go +lsp) ; the hipster dialect - (haskell +lsp) ; a language that's lazier than I am + ;;(graphql +lsp) ; Give queries a REST + ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on - ;;json ; At least it ain't XML - (java +lsp) ; the poster child for carpal tunnel syndrome - ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + json ; At least it ain't XML + ;;janet ; Fun fact: Janet is me! + ;;(java +lsp) ; the poster child for carpal tunnel syndrome + javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB - kotlin ; a better, slicker Java(Script) - latex ; writing papers in Emacs has never been so fun + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be - lua ; one-based indices? one-based indices + ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c (nix +lsp) ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - (org +lsp) ; organize your plain life in plain text + org ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more + ;;graphviz ; diagrams for confusing yourself even more ;;purescript ; javascript, but functional (python +lsp) ; beautiful is better than ugly - qt ; the 'cutest' gui framework ever + ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor @@ -174,6 +177,7 @@ ;;web ; the tubes ;;yaml ; JSON, but readable ;;zig ; C, but simpler + :email ;;(mu4e +org +gmail) ;;notmuch @@ -184,8 +188,7 @@ ;;emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - (rss +org) ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought + ;;(rss +org) ; emacs as an RSS reader :config ;;literate diff --git a/dots/doom/lisp/ollama.el b/dots/doom/lisp/ollama.el deleted file mode 100755 index 0a24c55..0000000 --- a/dots/doom/lisp/ollama.el +++ /dev/null @@ -1,113 +0,0 @@ -;;; ollama.el --- ollama client for Emacs - -;; Copyright (C) 2023 ZHOU Feng - -;; Author: ZHOU Feng -;; URL: http://github.com/zweifisch/ollama -;; Keywords: ollama llama2 -;; Version: 0.0.1 -;; Created: 6th Aug 2023 - -;; This file is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. - -;; This file is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: -;; -;; ollama client for Emacs -;; - -;;; Code: -(require 'json) -Package-Requires: ((cl-lib "0.5")) -(require 'cl-lib) -(require 'url) - -(defgroup ollama nil - "Ollama client for Emacs." - :group 'ollama) - -(defcustom ollama:endpoint "http://localhost:11434/api/generate" - "Ollama http service endpoint." - :group 'ollama - :type 'string) - -(defcustom ollama:model "codellama:13b" - "Ollama model." - :group 'ollama - :type 'string) - -(defcustom ollama:language "English" - "Language to translate to." - :group 'ollama - :type 'string) - -(defun ollama-fetch (url prompt model) - (let* ((url-request-method "POST") - (url-request-extra-headers - '(("Content-Type" . "application/json"))) - (url-request-data - (encode-coding-string - (json-encode `((model . ,model) (prompt . ,prompt))) - 'utf-8))) - (with-current-buffer (url-retrieve-synchronously url) - (goto-char url-http-end-of-headers) - (decode-coding-string - (buffer-substring-no-properties - (point) - (point-max)) - 'utf-8)))) - -(defun ollama-get-response-from-line (line) - (cdr - (assoc 'response - (json-read-from-string line)))) - -(defun ollama-prompt (url prompt model) - (mapconcat 'ollama-get-response-from-line - (cl-remove-if #'(lambda (str) (string= str "")) - (split-string (ollama-fetch url prompt model) "\n")) "")) - -;;;###autoload -(defun ollama-prompt-line () - "Prompt with current word." - (interactive) - (with-output-to-temp-buffer "*ollama*" - (princ - (ollama-prompt ollama:endpoint (thing-at-point 'line) ollama:model)))) - -;;;###autoload -(defun ollama-define-word () - "Find definition of current word." - (interactive) - (with-output-to-temp-buffer "*ollama*" - (princ - (ollama-prompt ollama:endpoint (format "define %s" (thing-at-point 'word)) ollama:model)))) - -;;;###autoload -(defun ollama-translate-word () - "Translate current word." - (interactive) - (with-output-to-temp-buffer "*ollama*" - (princ - (ollama-prompt ollama:endpoint (format "translate \"%s\" to %s" (thing-at-point 'word) ollama:language) ollama:model)))) - -;;;###autoload -(defun ollama-summarize-region () - "Summarize marked text." - (interactive) - (with-output-to-temp-buffer "*ollama*" - (princ - (ollama-prompt ollama:endpoint (format "summarize \"\"\"%s\"\"\"" (buffer-substring (region-beginning) (region-end))) ollama:model)))) - -(provide 'ollama) -;;; ollama.el ends here diff --git a/dots/doom/lisp/oxycarbon.el b/dots/doom/lisp/oxycarbon.el deleted file mode 100755 index e5bc3f5..0000000 --- a/dots/doom/lisp/oxycarbon.el +++ /dev/null @@ -1,111 +0,0 @@ - -(autothemer-deftheme oxocarbon "A port of oxocarbon" - - ;; Specify the color classes used by the theme - ((((class color) (min-colors #xFFFFFF)) - ((class color) (min-colors #xFF))) - - ;; Specify the color palette, color columns correspond to each of the classes above. - (oxocarbon-bg "#161616") - (oxocarbon-fg "#f2f4f8") - - (oxocarbon-base00 "#161616") - (oxocarbon-base01 "#262626") - (oxocarbon-base02 "#393939") - (oxocarbon-base03 "#525252") - - (oxocarbon-base04 "#dde1e6") - (oxocarbon-base05 "#f2f4f8") - (oxocarbon-base06 "#ffffff") - (oxocarbon-base07 "#08bdba") - (oxocarbon-base08 "#3ddbd9") - (oxocarbon-base09 "#78a9ff") - (oxocarbon-base10 "#ee5396") - (oxocarbon-base11 "#33b1ff") - (oxocarbon-base12 "#ff7eb6") - (oxocarbon-base13 "#42be65") - (oxocarbon-base14 "#be95ff") - (oxocarbon-base15 "#82cfff")) - - ;; Specifications for Emacs faces. - ;; Simpler than deftheme, just specify a face name and - ;; a plist of face definitions (nested for :underline, :box etc.) - ( - (default (:foreground oxocarbon-fg :background oxocarbon-bg)) ;; background and foreground - (button (:foreground oxocarbon-fg :background oxocarbon-base01)) - ;; (counsel--mark-ring-highlight) - - ;; Programming ;; - (font-lock-string-face (:foreground oxocarbon-base14)) ;; strings - (font-lock-keyword-face (:foreground oxocarbon-base09)) ;; keywords - (font-lock-type-face (:foreground oxocarbon-base09)) ;; variable types - (font-lock-variable-name-face (:foreground oxocarbon-base04)) ;; variable names - (font-lock-comment-face (:foreground oxocarbon-base03)) ;; comments - (font-lock-builtin-face (:foreground oxocarbon-base12)) ;; builtin functions - (font-lock-constant-face (:foreground oxocarbon-base14)) ;; constants - (font-lock-function-name-face (:foreground oxocarbon-base08)) ;; function names - (font-lock-preprocessor-face (:foreground oxocarbon-base09)) - (font-lock-doc-face (:foreground oxocarbon-base14)) - - (corfu-current (:background oxocarbon-base02 :foreground oxocarbon-base08)) - - ;; END ;; - - ;; General ;; - (error (:foreground oxocarbon-base10)) - (warning (:foreground oxocarbon-base13)) - ;; END ;; - - ;; UI ;; - (region (:background oxocarbon-base02)) ;; selction background - (highlight (:background oxocarbon-base02)) ;; highlight when hovering over a link etc. - - (mode-line (:foreground oxocarbon-fg :background oxocarbon-bg)) ;; modeline - (mode-line-inactive (:foreground oxocarbon-fg :background oxocarbon-bg)) - - (line-number-current-line (:foreground oxocarbon-base04 :background oxocarbon-base00)) ;; the current line num - (line-number (:foreground oxocarbon-base02)) ;; line numbers - - ;; parens - (show-paren-match (:background oxocarbon-base02)) ;; matching parens - (show-paren-mismatch (:background oxocarbon-base11)) ;; mismatching parens - - ;; isearch - (isearch-fail (:background oxocarbon-base10)) - - ;; ivy - (ivy-current-match (:background oxocarbon-base02 :foreground oxocarbon-base08)) - (ivy-minibuffer-match-face-1 (:foreground oxocarbon-base08)) - (ivy-minibuffer-match-face-2 (:foreground oxocarbon-base08)) - (ivy-minibuffer-match-face-3 (:foreground oxocarbon-base08)) - (ivy-minibuffer-match-face-4 (:foreground oxocarbon-base08)) - ;; END ;; - - - ) - - - ;; (custom-theme-set-variables 'oxocarbon - ;; `(ansi-color-names-vector [ - ;; ,oxocarbon-base00 - ;; ,oxocarbon-base01 - ;; ,oxocarbon-base02 - ;; ,oxocarbon-base03 - ;; ,oxocarbon-base04 - ;; ,oxocarbon-base05 - ;; ,oxocarbon-base06 - ;; ,oxocarbon-base07 - ;; ,oxocarbon-base08 - ;; ,oxocarbon-base09 - ;; ,oxocarbon-base10 - ;; ,oxocarbon-base11 - ;; ,oxocarbon-base12 - ;; ,oxocarbon-base13 - ;; ,oxocarbon-base14 - ;; ,oxocarbon-base15 - ;; ])) - - - ) - -(provide-theme 'oxocarbon) ;; theme ends here diff --git a/dots/doom/lisp/programs.el b/dots/doom/lisp/programs.el deleted file mode 100755 index ac3f660..0000000 --- a/dots/doom/lisp/programs.el +++ /dev/null @@ -1,9 +0,0 @@ -;;; ../../dotfiles/doom/.config/doom/lisp/programs.el -*- lexical-binding: t; -*- - -;; make a function to run a program with a given name and arguments -(defun run-program (name &rest args) - (interactive) - (let ((program (executable-find name))) - (if program - (apply #'start-process name nil program args) - (error "Could not find program %s" name)))) diff --git a/dots/doom/lisp/test.el b/dots/doom/lisp/test.el deleted file mode 100755 index e69de29..0000000 diff --git a/dots/doom/my_stuff.el b/dots/doom/my_stuff.el deleted file mode 100755 index 51c355a..0000000 --- a/dots/doom/my_stuff.el +++ /dev/null @@ -1,129 +0,0 @@ -;;; ../../dotfiles/doom/.config/doom/my_stuff.el -*- lexical-binding: t; -*- - -(defun emenu () - "List all executable programs in the PATH environment variable and open the selected one. - Any text entered after the program name (separated by a space) is taken as arguments to the program." - (interactive) - (let* ((path-dirs (delete-dups (split-string (getenv "PATH") path-separator))) - (executables (apply #'append - (mapcar #'(lambda (dir) - (when (file-directory-p dir) - (mapcar #'file-name-nondirectory - (directory-files dir t ".+" - 'nosort)))) - path-dirs))) - (buf (generate-new-buffer "Programs"))) - (with-current-buffer buf - (insert (mapconcat 'identity executables "\n"))) - (let* ((program (completing-read "Program: " executables)) - (args (if (string-match (concat "^" program " ") (buffer-substring-no-properties - (line-beginning-position) - (line-end-position))) - (substring-no-properties (buffer-substring-no-properties - (line-beginning-position) - (line-end-position)) (length program) nil) - nil)) - (program-args (if args (concat program " " args) program))) - (when program - (start-process-shell-command program nil program-args) - (kill-buffer buf))))) -(map! :leader - :desc "Emenu" "d e" #'emenu) - - -;; open pdfs scaled in zathura -(defun open-pdf-with-zathura () - (interactive) - (start-process "zathura" nil "zathura" (buffer-file-name))) - -(add-hook 'pdf-view-mode-hook - (lambda () - (open-pdf-with-zathura) - (kill-buffer))) - -;; open images in imv -(defun open-image-with-imv () - "Open the current image file with imv, then kill the current buffer and -open a dired buffer in the directory of the image file." - (interactive) - (let* ((current-file (buffer-file-name)) - (directory (file-name-directory current-file)) - (all-files (directory-files directory nil "\\(png\\|jpg\\|jpeg\\|gif\\|bmp\\)$")) - (selected-file (file-relative-name current-file directory)) - (selected-index (cl-position selected-file all-files :test #'equal)) - (sorted-files (append (nthcdr selected-index all-files) - (butlast all-files (- (length all-files) selected-index))))) - (apply 'start-process "imv" nil "imv" sorted-files)) - (let ((image-dir (when buffer-file-name (file-name-directory buffer-file-name)))) - (kill-buffer) - (when image-dir - (cd image-dir) - (dired image-dir)))) - -(add-hook 'image-mode-hook - (lambda () - (open-image-with-imv))) - - -;;(add-hook 'doom-switch-buffer-hook -;; (lambda () -;; (if (string= (buffer-name) "*doom*") -;; (elcord-mode -1) -;; (elcord-mode 1)))) - -;; search forwards for link and copy the link under point to the clipboard withouth external dependencies -(defun elfeed-copy-image () - "Copy the URL of the image under point to the clipboard." - (interactive) - (or (search-forward "link" nil t) - (search-backward "link" nil t)) - (let ((url (get-text-property (point) 'shr-url))) - (if url - (progn - (message (concat "Copying image URL to clipboard: " url)) - (kill-new url) - (message "Copied image URL to clipboard.")) - (message "No image under point.")))) -;;bind the function to a key spc i c -(map! :leader - :desc "Copy image URL to clipboard" "i c" #'elfeed-copy-image) - - -(defun open-video-with-mpv () - "Open the current video file with mpv, then kill the current buffer and -open a dired buffer in the directory of the video file." - (interactive) - (setq large-file-warning-threshold nil) ; disable threshold - (let ((current-file (buffer-file-name))) - (start-process "mpv" nil "mpv" current-file)) - (let ((video-dir (when buffer-file-name (file-name-directory buffer-file-name)))) - (kill-buffer) - (when video-dir - (cd video-dir) - (dired video-dir)))) - -(add-hook 'find-file-hook - (lambda () - (when (and buffer-file-name - (string-match-p "\\(mp4\\|avi\\|mkv\\|webm\\|flv\\|mov\\|wmv\\)$" buffer-file-name)) - (open-video-with-mpv)))) - - -(defun open-audio-with-mpv () - "Open the current audio file with mpv, then kill the current buffer and -open a dired buffer in the directory of the audio file." - (interactive) - (setq large-file-warning-threshold nil) ; disable threshold - (let ((current-file (buffer-file-name))) - (start-process "mpv" nil "mpv" "--no-video" current-file)) - (let ((audio-dir (when buffer-file-name (file-name-directory buffer-file-name)))) - (kill-buffer) - (when audio-dir - (cd audio-dir) - (dired audio-dir)))) - -(add-hook 'find-file-hook - (lambda () - (when (and buffer-file-name - (string-match-p "\\(mp3\\|flac\\|wav\\|aac\\|ogg\\|m4b\\)$" buffer-file-name)) - (open-audio-with-mpv)))) diff --git a/dots/doom/packages.el b/dots/doom/packages.el old mode 100755 new mode 100644 index 939679d..b3322c7 --- a/dots/doom/packages.el +++ b/dots/doom/packages.el @@ -3,76 +3,47 @@ ;; To install a package with Doom you must declare them here and run 'doom sync' ;; on the command line, then restart Emacs for the changes to take effect -- or -;; use 'M-x doom/reload'. ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: - ;(package! some-package) +;; (package! some-package) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: -;; https://github.com/raxod502/straight.el#the-recipe-format - ;(package! another-package - ; :recipe (:host github :repo "username/repo")) +;; https://github.com/radian-software/straight.el#the-recipe-format +;; (package! another-package +;; :recipe (:host github :repo "username/repo")) ;; If the package you are trying to install does not contain a PACKAGENAME.el ;; file, or is located in a subdirectory of the repo, you'll need to specify ;; `:files' in the `:recipe': - ;(package! this-package - ; :recipe (:host github :repo "username/repo" - ; :files ("some-file.el" "src/lisp/*.el"))) +;; (package! this-package +;; :recipe (:host github :repo "username/repo" +;; :files ("some-file.el" "src/lisp/*.el"))) ;; If you'd like to disable a package included with Doom, you can do so here ;; with the `:disable' property: - ;(package! builtin-package :disable t) +;; (package! builtin-package :disable t) ;; You can override the recipe of a built in package without having to specify ;; all the properties for `:recipe'. These will inherit the rest of its recipe ;; from Doom or MELPA/ELPA/Emacsmirror: - ;(package! builtin-package :recipe (:nonrecursive t)) - ;(package! builtin-package-2 :recipe (:repo "myfork/package")) +;; (package! builtin-package :recipe (:nonrecursive t)) +;; (package! builtin-package-2 :recipe (:repo "myfork/package")) ;; Specify a `:branch' to install a package from a particular branch or tag. ;; This is required for some packages whose default branch isn't 'master' (which -;; our package manager can't deal with; see raxod502/straight.el#279) - ;(package! builtin-package :recipe (:branch "develop")) +;; our package manager can't deal with; see radian-software/straight.el#279) +;; (package! builtin-package :recipe (:branch "develop")) ;; Use `:pin' to specify a particular commit to install. - ;(package! builtin-package :pin "1a2b3c4d5e") +;; (package! builtin-package :pin "1a2b3c4d5e") ;; Doom's packages are pinned to a specific commit and updated from release to ;; release. The `unpin!' macro allows you to unpin single packages... - ;(unpin! pinned-package) +;; (unpin! pinned-package) ;; ...or multiple packages - ;(unpin! pinned-package another-pinned-package) +;; (unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) - ;(unpin! t) -(package! catppuccin-theme) -;;(package! elcord) -(package! fill-column-indicator) -(package! rainbow-mode) -(package! poly-org) -(package! ein) -(package! copilot - :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) -;;(package! codeium -;; :recipe (:host github :repo "Exafunction/codeium.el" :files ("*.el"))) - -(package! ellama) -(package! highlight-indent-guides) -(package! yuck-mode) -(package! openai - :recipe (:host github :repo "emacs-openai/openai" :files ("*.el"))) -(package! chatgpt - :recipe (:host github :repo "mrfluffy-dev/chatgpt" :files ("*.el"))) - -(package! nasm-mode :pin "65ca6546fc395711fac5b3b4299e76c2303d43a8") -(package! haxor-mode :pin "6fa25a8e6b6a59481bc0354c2fe1e0ed53cbdc91") -(package! mips-mode :pin "98795cdc81979821ac35d9f94ce354cd99780c67") -(package! riscv-mode :pin "8e335b9c93de93ed8dd063d702b0f5ad48eef6d7") -(package! x86-lookup :pin "1573d61cc4457737b94624598a891c837fb52c16") -(package! package-lint :pin "21edc6d0d0eadd2d0a537f422fb9b7b8a3ae6991") - - -;;(package! jupyter) +;; (unpin! t) diff --git a/dots/doom/themes/doom-hardcore-theme.el b/dots/doom/themes/doom-hardcore-theme.el deleted file mode 100755 index 77c42e4..0000000 --- a/dots/doom/themes/doom-hardcore-theme.el +++ /dev/null @@ -1,120 +0,0 @@ -;;; doom-hardcore-theme.el --- inspired by the Hardcore theme -*- lexical-binding: t; no-byte-compile: t; -*- -;; -;; Added: February 23, 2025 -;; Author: Your Name -;; Maintainer: Your Name -;; Source: Hardcore Theme -;; -;;; Commentary: -;;; Code: - -(require 'doom-themes) - -;; -;;; Variables - -(defgroup doom-hardcore-theme nil - "Options for the `doom-hardcore' theme." - :group 'doom-themes) - -(defcustom doom-hardcore-brighter-modeline nil - "If non-nil, more vivid colors will be used to style the mode-line." - :group 'doom-hardcore-theme - :type 'boolean) - -(defcustom doom-hardcore-brighter-comments nil - "If non-nil, comments will be highlighted in more vivid colors." - :group 'doom-hardcore-theme - :type 'boolean) - -(defcustom doom-hardcore-colorful-headers nil - "If non-nil, headers in org-mode will be more colorful." - :group 'doom-hardcore-theme - :type 'boolean) - -(defcustom doom-hardcore-comment-bg doom-hardcore-brighter-comments - "If non-nil, comments will have a subtle, darker background." - :group 'doom-hardcore-theme - :type 'boolean) - -(defcustom doom-hardcore-padded-modeline doom-themes-padded-modeline - "If non-nil, adds a 4px padding to the mode-line. Can be an integer." - :group 'doom-hardcore-theme - :type '(choice integer boolean)) - -;; -;;; Theme definition - -(def-doom-theme doom-hardcore - "A dark theme based on the Hardcore theme." - - ;; name default 256 16 - ((bg '("#141414" "#121212" "black" )) - (bg-alt '("#141414" "#0d0d0d" "black" )) - (base0 '("#0f0f0f" "#0a0a0a" "black" )) - (base1 '("#191919" "#161616" "brightblack" )) - (base2 '("#242424" "#202020" "brightblack" )) - (base3 '("#303030" "#282828" "brightblack" )) - (base4 '("#3c3c3c" "#363636" "brightblack" )) - (base5 '("#4e4e4e" "#484848" "brightblack" )) - (base6 '("#8c8c8c" "#888888" "brightblack" )) - (base7 '("#b2b2b2" "#b0b0b0" "brightblack" )) - (base8 '("#ffffff" "#eeeeee" "white" )) - (fg '("#e0e0e0" "#ffffff" "white" )) - (fg-alt '("#c6c6c6" "#b0b0b0" "brightwhite" )) - - (grey base4) - (red '("#ff5f5f" "#ff6b6b" "red" )) - (orange '("#ffaf5f" "#ffae5f" "brightred" )) - (green '("#5fff5f" "#6bff6b" "green" )) - (teal '("#5fafd7" "#5faed7" "brightgreen" )) - (yellow '("#ffff5f" "#ffff6b" "yellow" )) - (blue '("#5fafff" "#5faeff" "brightblue" )) - (dark-blue '("#005f87" "#004f77" "blue" )) - (magenta '("#af5fff" "#ae5fff" "magenta" )) - (violet '("#875fff" "#865fff" "brightmagenta")) - (cyan '("#5fdfff" "#5fceff" "brightcyan" )) - (dark-cyan '("#0087af" "#00779f" "cyan" )) - - ;; face categories -- required for all themes - (highlight magenta) - (vertical-bar (doom-darken base1 0.1)) - (selection dark-blue) - (builtin orange) - (comments (if doom-hardcore-brighter-comments dark-cyan base5)) - (doc-comments (doom-lighten (if doom-hardcore-brighter-comments dark-cyan base5) 0.25)) - (constants cyan) - (functions green) - (keywords magenta) - (methods teal) - (operators violet) - (type violet) - (strings yellow) - (variables (doom-lighten magenta 0.6)) - (numbers violet) - (region `(,(car base3) ,@(cdr base1))) - (error red) - (warning yellow) - (success green) - (vc-modified orange) - (vc-added green) - (vc-deleted red) - - ;; modeline - (-modeline-bright doom-hardcore-brighter-modeline) - (-modeline-pad (when doom-hardcore-padded-modeline (if (integerp doom-hardcore-padded-modeline) doom-hardcore-padded-modeline 4))) - (modeline-bg `(,(doom-darken (car bg) 0.15) ,@(cdr base0))) - (modeline-bg-l `(,(car bg) ,@(cdr base0))) - (modeline-bg-inactive `(,(doom-darken (car bg) 0.075) ,@(cdr base1))) - (modeline-bg-inactive-l (doom-darken bg 0.1))) - - ;; Base theme face overrides - (((line-number &override) :foreground base5) - ((line-number-current-line &override) :foreground fg) - (mode-line :background modeline-bg :foreground base8 - :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) - (mode-line-inactive :background modeline-bg-inactive :foreground base5 - :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))) - ) - -;;; doom-hardcore-theme.el ends here diff --git a/dots/doom/themes/doom-pandora-theme.el b/dots/doom/themes/doom-pandora-theme.el deleted file mode 100755 index b60679a..0000000 --- a/dots/doom/themes/doom-pandora-theme.el +++ /dev/null @@ -1,107 +0,0 @@ -;;; doom-pandora-theme.el --- Pandora Base16 theme for Doom Emacs -*- lexical-binding: t; no-byte-compile: t; -*- -;; -;; Based on Base16 Pandora scheme by Cassandra Fox. -;; Adapted from doom-dracula-theme.el -;; -;;; Commentary: -;; This theme is a modification of the Doom Dracula theme, -;; replacing the Dracula palette with the Base16 Pandora colors. -;; -;;; Code: - -(require 'doom-themes) - -(defgroup doom-pandora-theme nil - "Options for the `doom-pandora' theme." - :group 'doom-themes) - -(defcustom doom-pandora-brighter-modeline nil - "If non-nil, more vivid colors will be used to style the mode-line." - :group 'doom-pandora-theme - :type 'boolean) - -(defcustom doom-pandora-brighter-comments nil - "If non-nil, comments will be highlighted in more vivid colors." - :group 'doom-pandora-theme - :type 'boolean) - -(defcustom doom-pandora-colorful-headers nil - "If non-nil, headers in org-mode will be more colorful." - :group 'doom-pandora-theme - :type 'boolean) - -(defcustom doom-pandora-comment-bg doom-pandora-brighter-comments - "If non-nil, comments will have a subtle, darker background to enhance legibility." - :group 'doom-pandora-theme - :type 'boolean) - -(defcustom doom-pandora-padded-modeline doom-themes-padded-modeline - "If non-nil, adds a padding to the mode-line. It can be an integer to specify exact padding." - :group 'doom-pandora-theme - :type '(choice integer boolean)) - - -(def-doom-theme doom-pandora - "A dark theme based on the Base16 Pandora color scheme by Cassandra Fox." - - ;; Palette: - ;; Base16 Pandora (keys from base00 to base0F) - ((bg '("#131213" nil nil)) ; base00 - (bg-alt '("#2f1823" nil nil)) ; base01 - (base02 '("#472234" nil nil)) ; base02 - (base03 '("#ffbee3" nil nil)) ; base03 - (base04 '("#9b2a46" nil nil)) ; base04 - (fg '("#f15c99" "#f15c99" "brightwhite")) ; base05 - (fg-alt '("#9ddf69" "#9ddf69" "white")) ; base0B - (accent '("#008080" nil nil)) ; base0D - - (base06 '("#81506a" nil nil)) ; base06 - (base07 '("#632227" nil nil)) ; base07 - (base08 '("#b00b69" nil nil)) ; base08 (red) - (base09 '("#ff9153" nil nil)) ; base09 (orange) - (base0A '("#ffcc00" nil nil)) ; base0A (yellow) - (base0C '("#714ca6" nil nil)) ; base0C (blue) - (base0D '("#008080" nil nil)) ; base0D (teal; reused as accent) - (base0E '("#a24030" nil nil)) ; base0E (magenta) - (base0F '("#a24030" nil nil)) ; base0F (duplicate of base0E) - - ;; You may optionally define a "grey" for extra use: - (grey base04)) - - ;; Face categories: - ;; Here we map our palette to Doom's standard face categories. - ((red base08) - (orange base09) - (green base0B) - (teal base0D) - (yellow base0A) - (blue base0C) - (dark-blue (doom-darken base0C 0.2)) - (magenta base0E) - (violet (doom-blend base0E base0C 0.5)) - (cyan base0D)) ; Using base0D for cyan (teal) - - ;; Base theme face overrides - (((line-number &override) :foreground base04) - ((line-number-current-line &override) :foreground fg) - ((font-lock-comment-face &override) - :background (if doom-pandora-comment-bg (doom-lighten bg 0.05) 'unspecified)) - (mode-line - :background accent :foreground fg - :box (when doom-pandora-padded-modeline - `(:line-width ,(if (integerp doom-pandora-padded-modeline) - doom-pandora-padded-modeline 4) - :color ,accent))) - (mode-line-inactive - :background (doom-darken bg 0.075) :foreground base04 - :box (when doom-pandora-padded-modeline - `(:line-width ,(if (integerp doom-pandora-padded-modeline) - doom-pandora-padded-modeline 4) - :color ,(doom-darken bg 0.075)))) - (mode-line-emphasis :foreground (if doom-pandora-brighter-modeline fg accent)) - ;; Example for org-mode customizations: - ((org-tag &override) :foreground (doom-lighten orange 0.3))) - ;; No additional variable overrides - ()) - -;;; doom-pandora-theme.el ends here diff --git a/dots/doom/xenia.png b/dots/doom/xenia.png deleted file mode 100755 index da746a2..0000000 Binary files a/dots/doom/xenia.png and /dev/null differ diff --git a/dots/hyprland.nix b/dots/hyprland.nix index acfe4f0..7652f41 100755 --- a/dots/hyprland.nix +++ b/dots/hyprland.nix @@ -4,6 +4,7 @@ pkgs, window_manager, systemName, + inputs, ... }: let @@ -13,6 +14,7 @@ let runner = "anyrun"; browser = "zen-twilight"; editor = "emacsclient -c"; + caelestia-cli = inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli; in { wayland = { @@ -211,10 +213,11 @@ in "${mod}, M, exit," "${mod}, F, exec, ${fileManager}" "${mod}, V, togglefloating," - "${mod}, T, fullscreen" + "${mod}, T, fullscreen" "${mod}, D, exec, ${runner}" "${mod}, E, exec, ${editor}" - ",Print, exec, grim -g \"$(slurp)\" - | swappy -f -" + #",Print, exec, grim -g \"$(slurp)\" - | swappy -f -" + ",Print, exec, ${lib.getExe caelestia-cli} screenshot -r" "${mod}, P, pseudo, " # dwindle #focus with mainMod + arrow keys #"${mod}, H, movefocus, l" diff --git a/dots/shell b/dots/shell deleted file mode 160000 index 6ae4514..0000000 --- a/dots/shell +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6ae451413ddab08fce7326f141ee4e2508237b45 diff --git a/flake.lock b/flake.lock index 3eb07d9..aa77487 100644 --- a/flake.lock +++ b/flake.lock @@ -22,6 +22,48 @@ "type": "github" } }, + "app2unit": { + "inputs": { + "nixpkgs": [ + "caelestia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752640923, + "narHash": "sha256-jcoNgqOaD7wuoYg6y+BXuCHueDzJ7gjR7RdFKHBNg2A=", + "owner": "soramanew", + "repo": "app2unit", + "rev": "d0159c1d7090f8563db6bedd153cb8168628b06d", + "type": "github" + }, + "original": { + "owner": "soramanew", + "repo": "app2unit", + "type": "github" + } + }, + "app2unit_2": { + "inputs": { + "nixpkgs": [ + "caelestia-cli", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752640923, + "narHash": "sha256-jcoNgqOaD7wuoYg6y+BXuCHueDzJ7gjR7RdFKHBNg2A=", + "owner": "soramanew", + "repo": "app2unit", + "rev": "d0159c1d7090f8563db6bedd153cb8168628b06d", + "type": "github" + }, + "original": { + "owner": "soramanew", + "repo": "app2unit", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -105,6 +147,104 @@ "type": "github" } }, + "caelestia": { + "inputs": { + "app2unit": "app2unit", + "caelestia-cli": "caelestia-cli", + "nixpkgs": "nixpkgs", + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1754318161, + "narHash": "sha256-YUQZClf+LA0gpTJfdOg+FSdrJzF9dyDrrFfP1RKPXZc=", + "owner": "caelestia-dots", + "repo": "shell", + "rev": "6ae451413ddab08fce7326f141ee4e2508237b45", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "shell", + "type": "github" + } + }, + "caelestia-cli": { + "inputs": { + "app2unit": [ + "caelestia", + "app2unit" + ], + "caelestia-shell": [ + "caelestia" + ], + "nixpkgs": [ + "caelestia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753407718, + "narHash": "sha256-VnqE8hpqyIdJ91OBaJatxGyNccev+OC19U/MVZUd/0E=", + "owner": "caelestia-dots", + "repo": "cli", + "rev": "2bde2ddfbf56277fbf93af96fe3a88cb042b6696", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "cli", + "type": "github" + } + }, + "caelestia-cli_2": { + "inputs": { + "app2unit": "app2unit_2", + "caelestia-shell": "caelestia-shell", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1754293738, + "narHash": "sha256-oeWuxJIpO4D5NTbHI0mK4r5I0t2HPCWUwsOsSL2w4EY=", + "owner": "caelestia-dots", + "repo": "cli", + "rev": "f541e99d076cd87a5947200ff0f7a0065329a30a", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "cli", + "type": "github" + } + }, + "caelestia-shell": { + "inputs": { + "app2unit": [ + "caelestia-cli", + "app2unit" + ], + "caelestia-cli": [ + "caelestia-cli" + ], + "nixpkgs": [ + "caelestia-cli", + "nixpkgs" + ], + "quickshell": "quickshell_2" + }, + "locked": { + "lastModified": 1754283125, + "narHash": "sha256-963FwoaeO99FZaYWNPNxYj2eLd1DAeJleZOO6cRMyDo=", + "owner": "caelestia-dots", + "repo": "shell", + "rev": "c1b844b8571b6a5f9bde2490f841e76a0c8efaac", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "shell", + "type": "github" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -372,7 +512,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -490,7 +630,7 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1751592500, @@ -508,15 +648,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", - "owner": "NixOS", + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "rev": "94def634a20494ee057c76998843c015909d6311", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -569,6 +709,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "94def634a20494ee057c76998843c015909d6311", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1751271578, + "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1749494155, "narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=", @@ -584,7 +756,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1751271578, "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", @@ -600,7 +772,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1748460289, "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", @@ -616,7 +788,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1743448293, "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", @@ -679,6 +851,49 @@ } }, "quickshell": { + "inputs": { + "nixpkgs": [ + "caelestia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753595452, + "narHash": "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k=", + "ref": "refs/heads/master", + "rev": "a5431dd02dc23d9ef1680e67777fed00fe5f7cda", + "revCount": 665, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, + "quickshell_2": { + "inputs": { + "nixpkgs": [ + "caelestia-cli", + "caelestia-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753595452, + "narHash": "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k=", + "ref": "refs/heads/master", + "rev": "a5431dd02dc23d9ef1680e67777fed00fe5f7cda", + "revCount": 665, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, + "quickshell_3": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -701,14 +916,16 @@ "root": { "inputs": { "anyrun": "anyrun", + "caelestia": "caelestia", + "caelestia-cli": "caelestia-cli_2", "home-manager": "home-manager", "niri": "niri", "nix-alien": "nix-alien", "nix-colors": "nix-colors", "nixcord": "nixcord", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "qs-qml": "qs-qml", - "quickshell": "quickshell", + "quickshell": "quickshell_3", "stylix": "stylix", "zen-browser": "zen-browser" } @@ -725,7 +942,7 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "nur": "nur", "systems": "systems_2", "tinted-foot": "tinted-foot", @@ -917,7 +1134,7 @@ "zen-browser": { "inputs": { "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1751599118, diff --git a/flake.nix b/flake.nix index 414fa71..421ba3c 100755 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ zen-browser.url = "github:0xc000022070/zen-browser-flake"; nixcord.url = "github:kaylorben/nixcord"; niri.url = "github:sodiboo/niri-flake"; + caelestia.url = "github:caelestia-dots/shell"; + caelestia-cli.url = "github:caelestia-dots/cli"; quickshell = { # remove ?ref=v0.1.0 to track the master branch url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; diff --git a/home/homePkgs.nix b/home/homePkgs.nix index 81f7b39..cd05cdb 100755 --- a/home/homePkgs.nix +++ b/home/homePkgs.nix @@ -210,5 +210,7 @@ in #grayjay youtube-music ulauncher + inputs.caelestia.packages.${pkgs.system}.caelestia-shell + inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli ]; } diff --git a/home/mrfluffy.nix b/home/mrfluffy.nix index 155a538..ee2948d 100755 --- a/home/mrfluffy.nix +++ b/home/mrfluffy.nix @@ -99,8 +99,8 @@ in ".config/nixpkgs/config.nix".text = '' { allowUnfree = true; } ''; - #".config/doom".source = ../dots/doom; - ".config/shell".source = ../dots/quickshell; + ".config/doom".source = ../dots/doom; + #".config/quickshell".source = ../dots/shell; #".config/kitty".source = ../../universal/dots/kitty; #".config/nvim".source = ../../universal/dots/nvim; "Pictures/Wallpapers".source = ../assets/Wallpapers; diff --git a/home/services.nix b/home/services.nix index a383a06..a2dde41 100644 --- a/home/services.nix +++ b/home/services.nix @@ -7,7 +7,7 @@ ... }: let - quickshellPackage = inputs.quickshell.packages.${pkgs.system}.default; + quickshellPackage = inputs.caelestia.packages.${pkgs.system}.caelestia-shell; in { systemd.user.services.quickshell = lib.mkIf (window_manager == "hyprland") { @@ -19,7 +19,7 @@ in Service = { Type = "simple"; - ExecStart = "${quickshellPackage}/bin/quickshell"; + ExecStart = "${quickshellPackage}/bin/caelestia-shell"; ExecStartPre = "/bin/sh -c 'test -n \"$WAYLAND_DISPLAY\"'"; Restart = "always"; RestartSec = "5s"; @@ -29,23 +29,4 @@ in WantedBy = [ "graphical-session.target" ]; }; }; - systemd.user.services.ulauncher = { - Unit = { - Description = "Ulauncher service"; - Documentation = [ "https://ulauncher.io/" ]; - After = [ "graphical-session.target" ]; - }; - - Service = { - Type = "simple"; - BusName = "io.ulauncher.Ulauncher"; - Environment="GDK_BACKEND=x11"; - ExecStart = "${lib.getExe pkgs.ulauncher} --hide-window"; - Restart = "always"; - RestartSec = 1; - }; - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - }; } diff --git a/home/work.nix b/home/work.nix index 8b68ed8..839a34c 100755 --- a/home/work.nix +++ b/home/work.nix @@ -100,8 +100,8 @@ in ".config/nixpkgs/config.nix".text = '' { allowUnfree = true; } ''; - #".config/doom".source = ../dots/doom; - ".config/shell".source = ../dots/quickshell; + ".config/doom".source = ../dots/doom; + #".config/quickshell".source = ../dots/shell; #".config/kitty".source = ../../universal/dots/kitty; #".config/nvim".source = ../../universal/dots/nvim; "Pictures/Wallpapers".source = ../assets/Wallpapers;