diff --git a/doom/config.el b/doom/config.el index 70bde4f..e9221bc 100644 --- a/doom/config.el +++ b/doom/config.el @@ -5,36 +5,60 @@ ;; Some functionality uses this to identify you, e.g. GPG configuration, email -;; clients, file templates and snippets. +;; clients, file templates and snippets. It is optional. (setq user-full-name "Kyle Yasuda" - user-mail-address "ksyasuda@umich.edu") + user-mail-address "the.sudacode@gmail.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-unicode-font' -- for unicode glyphs +;; - `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)) -;; (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14)) -(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14)) +;; 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: (setq doom-theme 'doom-one) +(setq doom-font (font-spec :family "JetBrains Mono Nerd Font" :size 12.0)) + +;; 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/") -;; Here are some additional functions/macros that could help you configure Doom: +;; Whenever you reconfigure a package, make sure to wrap your config in an +;; `after!' block, otherwise Doom's defaults may override your settings. E.g. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. ;; ;; - `load!' for loading external *.el files relative to this one ;; - `use-package!' for configuring packages @@ -47,86 +71,34 @@ ;; 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. +;;-------;; +;; VTERM ;; +;;-------;; +(after! vterm + (set-popup-rule! "*doom:vterm-popup:main" :size 0.45 :vslot -4 :select t :quit nil :ttl 0 :side 'right) +) - -(setq python-prettify-symbols-alist - '(("lambda" . ?λ) - ("and" . ?∧) - ("or" . ?∨) - ("in" . ?∈) - ("for" . ?∀) - ("def" . ?ƒ) - ("int" . ?ℤ) - ("not" . ?¬))) - -;; (setq prettify-symbols-alist -;; '(("lambda" . ?λ) -;; ("&&" . ?∧) -;; ("||" . ?∨) -;; ("in" . ?∈) -;; ("for" . ?∀) -;; ("function" . ?ƒ) -;; ("int" . ?ℤ) -;; ("not" . ?¬))) - - +;;----------;; +;; WAKATIME ;; +;;----------;; (use-package! wakatime-mode :ensure t) (global-wakatime-mode) +;;-----------;; +;; FIRA CODE ;; +;;-----------;; +;; (use-package! fira-code-mode +;; :hook prog-mode) -(use-package! fira-code-mode - :hook prog-mode) - -;;; LSP -(use-package! lsp - :init - (setq lsp-pyls-plugins-pylint-enabled t) - (setq lsp-pyls-plugins-autopep8-enabled t) - (setq lsp-pyls-plugins-yapf-enabled t) - (setq lsp-pyls-plugins-pyflakes-enabled t) -) - -(lsp-ui-mode) - -;; (require 'lsp-python-ms) -;; (use-package lsp-python-ms -;; :init (setq lsp-python-ms-auto-install-server t) -;; :hook (python-mode . (lambda () -;; (require 'lsp-python-ms) -;; (lsp)))) ; or lsp-deferred - -(use-package lsp-pyright - :ensure t - :hook (python-mode . (lambda () - (require 'lsp-pyright) - (lsp)))) ; or lsp-deferred - -(use-package! lsp-mode - :commands lsp - :hook - (sh-mode . 'lsp)) - -(setq lsp-enable-folding t) - -(org-babel-do-load-languages - 'org-babel-load-languages - '((python . t))) - - -;; (setq python-shell-interpreter "ipython" -;; python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True") - -; (setf (lsp-session-folders-blacklist (lsp-session)) nil) -; (lsp--persist-session (lsp-session)) - -(advice-add 'lsp :before (lambda (&rest _args) (eval '(setf (lsp-session-server-id->folders (lsp-session)) (ht))))) - -;;; all the icons - +;;---------------;; +;; ALL THE ICONS ;; +;;---------------;; (add-load-path! (expand-file-name "~/Downloads/all-the-icons-dired")) (load "all-the-icons-dired.el") (use-package! all-the-icons-dired @@ -147,104 +119,50 @@ (all-the-icons-dired-mode 1))) (add-hook 'dired-mode-hook 'all-the-icons-dired-mode) - -;;; enacs application framework -(use-package eaf - :load-path "~/Downloads/emacs-application-framework" ; Set to "/usr/share/emacs/site-lisp/eaf" if installed from AUR - :custom - ; See https://github.com/emacs-eaf/emacs-application-framework/wiki/Customization - (eaf-browser-continue-where-left-off t) - (eaf-browser-enable-adblocker t) - (browse-url-browser-function 'eaf-open-browser) - :config - (defalias 'browse-web #'eaf-open-browser)) - -(require 'eaf-system-monitor) -(require 'eaf-pdf-viewer) -(require 'eaf-terminal) -(require 'eaf-music-player) -(require 'eaf-browser) -(require 'eaf-jupyter) -(require 'eaf-file-browser) -(require 'eaf-markdown-previewer) -(require 'eaf-image-viewer) -(require 'eaf-file-manager) -(require 'eaf-airshare) -(require 'eaf-org-previewer) -(require 'eaf-file-sender) -(require 'eaf-video-player) - -(require 'eaf-evil) - - -(define-key key-translation-map (kbd "SPC") - (lambda (prompt) - (if (derived-mode-p 'eaf-mode) - (pcase eaf--buffer-app-name - ("browser" (if (string= (eaf-call-sync "call_function" eaf--buffer-id "is_focus") "True") - (kbd "SPC") - (kbd eaf-evil-leader-key))) - ("pdf-viewer" (kbd eaf-evil-leader-key)) - ("image-viewer" (kbd eaf-evil-leader-key)) - (_ (kbd "SPC"))) - (kbd "SPC")))) - - -;;; vterm - -(after! vterm - (set-popup-rule! "*doom:vterm-popup:main" :size 0.45 :vslot -4 :select t :quit nil :ttl 0 :side 'right) -) - -;;; gif screencast - -(with-eval-after-load 'gif-screencast - (define-key gif-screencast-mode-map (kbd "") 'gif-screencast-toggle-pause)) - -(global-set-key (kbd "") 'gif-screencast-start-or-stop) - - -;;; HOOKS - - -(add-hook 'org-mode-hook #'org-bullets-mode) -(add-hook 'before-save-hook 'py-isort-before-save) - -(after! flyspell - (setq flyspell-lazy-idle-seconds 2)) - -;;; VARIABLES -;; 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) +;;-----------;; +;; VARIABLES ;; +;;-----------;; +;; :set relativenumber +(setq display-line-numbers-type 'relative) (setq rainbow-delimiters-mode t) (setq confirm-kill-emacs nil) +(setq browse-url-browser-function 'browse-url-firefox) +(setq prettify-symbols-mode nil) +(setq +pretty-code-enabled-modes nil) (setq prettify-symbols-mode nil) (setq global-prettify-symbols-mode nil) -(setq browse-url-browser-function 'browse-url-firefox) +(setq lsp-diagnostic-package :none) +(setq shfmt-arguments '("-i" "0" "-ci" "-sr")) +;; (setq lsp-ui-doc-position 'bottom) +;; (setq lsp-ui-doc-alignment 'window) +;; (setq lsp-ui-doc-max-height 25) +;; (setq lsp-ui-doc-max-width 350) +;; (setq lsp-ui-doc-mode t) +;; (setq lsp-ui-peek-mode t) +;; (setq lsp-ui-peek-enable t) +;; (setq lsp-ui-doc-delay 0.25) -(setq lsp-ui-doc-position 'bottom) -(setq lsp-ui-doc-alignment 'window) -(setq lsp-ui-doc-max-height 25) -(setq lsp-ui-doc-max-width 350) -(setq lsp-ui-doc-mode t) -(setq lsp-ui-peek-mode t) -(setq lsp-ui-peek-enable t) -(setq lsp-ui-doc-delay 0.25) +;; (setq eaf-terminal-font-size 12) +;; (setq lsp-treemacs-sync-mode 1) -(setq eaf-terminal-font-size 12) -(setq lsp-treemacs-sync-mode 1) - -;; (setq lsp-python-ms-auto-install-server t) +;;--------;; +;; HOOKS ;; +;;--------;; +(add-hook 'org-mode-hook #'org-bullets-mode) +(add-hook 'before-save-hook 'py-isort-before-save) (add-hook 'python-mode-hook #'lsp) ; or lsp-deferred +(add-hook 'sh-mode-hook 'shfmt-on-save-mode 'flycheck-mode) - +;;--------;; +;; AFTER ;; +;;--------;; (after! 'treemacs (define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action)) -;;; KEYBINDINGS - +;;--------------;; +;; KEYBINDINGS ;; +;;--------------;; (map! :leader (:prefix ("o" . "+open") :desc "Launch lsp-ui-imenu" diff --git a/doom/config.org b/doom/config.org new file mode 100644 index 0000000..e69de29 diff --git a/doom/init.el b/doom/init.el index 050c26f..19fae8f 100644 --- a/doom/init.el +++ b/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 @@ -16,25 +16,26 @@ (doom! :input ;;chinese - japanese + ;;japanese ;;layout ; auie,ctsrnm is the superior home row :completion + company ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life - (vertico +icons) ; the search engine of the future + vertico ; the search engine of the future :ui - ;; deft ; notational velocity for Emacs + ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode +github +ascii) ; 🙂 + (emoji +unicode +ascii +github) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra - indent-guides ; highlighted indent columns - (ligatures +fira) ; ligatures and symbols to make your code pretty again + ;;indent-guides ; highlighted indent columns + ;; (ligatures +fira) ; 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 @@ -54,15 +55,15 @@ (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 + ;;multiple-cursors ; editing in many places at once ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates snippets ; my elves. They type so I don't have to - word-wrap ; soft wrapping with language-aware indent + ;;word-wrap ; soft wrapping with language-aware indent :emacs (dired +icons) ; making dired pretty [functional] @@ -78,31 +79,32 @@ vterm ; the best terminal emulation in Emacs :checkers - syntax ; tasing you for every semicolon you forget - (spell +flyspell) ; tasing you for misspelling mispelling + (syntax +childframe) ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools - ;;ansible - debugger ; FIXME stepping through code, to help you add bugs + ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;debugger ; FIXME stepping through code, to help you add bugs direnv - docker + (docker +lsp) ;;editorconfig ; let someone else argue about tabs vs spaces ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) - gist ; interacting with github gists + ;;gist ; interacting with github gists lookup ; navigate your code and its documentation - lsp ; M-x vscode + (lsp +peek) ; M-x vscode magit ; a git porcelain for Emacs make ; run make tasks from Emacs - (pass +auth) ; password manager for nerds + ;;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 - upload ; map local to remote projects via ssh/ftp + tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp :os (:if IS-MAC macos) ; improve compatibility with macOS @@ -111,12 +113,12 @@ :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 ; unity, .NET, and mono shenanigans + (csharp +lsp) ; unity, .NET, and mono shenanigans data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall @@ -127,22 +129,23 @@ ;;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 ; the language you waited for - ;;(go +lsp) ; the hipster dialect - ;;(haskell +lsp) ; a language that's lazier than I am + (go +lsp) ; the hipster dialect + (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 +meghanada) ; the poster child for carpal tunnel syndrome + (json +lsp) ; At least it ain't XML + (java +lsp) ; the poster child for carpal tunnel syndrome (javascript +lsp) ; 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 ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be - ;;lua ; one-based indices? one-based indices + (lua +lsp) ; one-based indices? one-based indices (markdown +grip) ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c nix ; I hereby declare "nix geht mehr!" @@ -151,14 +154,14 @@ ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - (python +lsp +pyenv) ; beautiful is better than ugly + (python +lsp +pyright) ; beautiful is better than ugly ;;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 ; 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 +lsp) ; she sells {ba,z,fi}sh shells on the C xor @@ -166,23 +169,23 @@ ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - ;;web ; the tubes - ;;yaml ; JSON, but readable + web ; the tubes + (yaml +lsp) ; JSON, but readable ;;zig ; C, but simpler :email - (mu4e +org +gmail) + ;;(mu4e +org +gmail) ;;notmuch ;;(wanderlust +gmail) :app - calendar + ;;calendar ;;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 + ;;twitter ; twitter client https://twitter.com/vnought :config - ;;literate + literate (default +bindings +smartparens)) diff --git a/doom/packages.el b/doom/packages.el index fd7e6f6..6a19825 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -49,20 +49,12 @@ ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) -(package! lsp-jedi) -(package! flycheck) (package! org-bullets) (package! wakatime-mode) (package! py-isort) (package! python-pytest) (package! python-docstring) -(package! py-autopep8) (package! fira-code-mode) -(package! lsp-ui) -(package! gif-screencast) (package! treemacs-icons-dired) -(package! howdoi) -(package! persist) -(package! pipenv) -;; (package! lsp-python-ms) -(package! lsp-pyright) +(package! flycheck) +(package! shfmt)