From 6b7e602dbc53d9a216b065e938d6ca4b94377fb2 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sat, 9 Nov 2024 16:06:13 +0000 Subject: [PATCH] emacs cfg --- doomemacs/.config/doom/config.el | 56 ++----------------------- doomemacs/.config/doom/custom.el | 26 ------------ doomemacs/.config/doom/init.el | 65 ++++++++++++++---------------- doomemacs/.config/doom/packages.el | 31 +++++++------- 4 files changed, 48 insertions(+), 130 deletions(-) delete mode 100644 doomemacs/.config/doom/custom.el diff --git a/doomemacs/.config/doom/config.el b/doomemacs/.config/doom/config.el index a139089..98f340a 100644 --- a/doomemacs/.config/doom/config.el +++ b/doomemacs/.config/doom/config.el @@ -15,12 +15,14 @@ ;; - `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-symbol-font' -- for symbols ;; - `doom-serif-font' -- for the `fixed-pitch-serif' face ;; ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: ;; +;;(setq doom-font (font-spec :family "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 @@ -73,60 +75,10 @@ ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. -;; Indentation -;; (setq-default tab-width 4) -;; (setq-default indent-tabs-mode t) - -;; Discord thing -;; (elcord-mode) - -;; (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) -;; Find file -(global-set-key "\C-s" 'swiper) -(global-set-key (kbd "C-c C-r") 'ivy-resume) -(global-set-key (kbd "") 'ivy-resume) -(global-set-key (kbd "M-x") 'counsel-M-x) -(global-set-key (kbd "M-f") 'counsel-find-file) -(global-set-key (kbd " f") 'counsel-describe-function) -(global-set-key (kbd " v") 'counsel-describe-variable) -(global-set-key (kbd " o") 'counsel-describe-symbol) -(global-set-key (kbd " l") 'counsel-find-library) -(global-set-key (kbd " i") 'counsel-info-lookup-symbol) -(global-set-key (kbd " u") 'counsel-unicode-char) -(global-set-key (kbd "C-c g") 'counsel-git) -(global-set-key (kbd "C-c j") 'counsel-git-grep) -(global-set-key (kbd "C-c k") 'counsel-ag) -(global-set-key (kbd "C-x l") 'counsel-locate) -(global-set-key (kbd "C-S-o") 'counsel-rhythmbox) -(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history) - - -(global-set-key (kbd "M-g") 'format-all-buffer) - -;; accept completion from copilot and fallback to company -;; (use-package! copilot -;; :hook (prog-mode . copilot-mode) -;; :bind (:map copilot-completion-map -;; ("" . 'copilot-accept-completion) -;; ("TAB" . 'copilot-accept-completion) -;; ("C-TAB" . 'copilot-accept-completion-by-word) -;; ("C-" . 'copilot-accept-completion-by-word))) +;; Mappings for dragging stuff (use-package! drag-stuff :config (drag-stuff-global-mode 1) (map! :v "J" #'drag-stuff-down :v "K" #'drag-stuff-up)) - -;; (after! (evil copilot) -;; ;; Define the custom function that either accepts the completion or does the default behavior -;; (defun my/copilot-tab-or-default () -;; (interactive) -;; (if (and (bound-and-true-p copilot-mode) -;; ;; Add any other conditions to check for active copilot suggestions if necessary -;; ) -;; (copilot-accept-completion) -;; (evil-insert 1))) ; Default action to insert a tab. Adjust as needed. - -;; ;; Bind the custom function to in Evil's insert state -;; (evil-define-key 'insert 'global (kbd "") 'my/copilot-tab-or-default)) diff --git a/doomemacs/.config/doom/custom.el b/doomemacs/.config/doom/custom.el deleted file mode 100644 index 758e730..0000000 --- a/doomemacs/.config/doom/custom.el +++ /dev/null @@ -1,26 +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. - '(custom-safe-themes - '("2dd4951e967990396142ec54d376cced3f135810b2b69920e77103e0bcedfba9" default)) - '(elcord-display-buffer-details nil) - '(elcord-display-elapsed t) - '(elcord-display-line-numbers nil) - '(elcord-editor-icon "emacs_material_icon") - '(elcord-icon-base - "https://raw.githubusercontent.com/Mstrodl/elcord/master/icons/") - '(elcord-idle-message "Thinking...") - '(elcord-mode t nil (elcord)) - '(elcord-quiet t) - '(package-selected-packages - '(elcord quelpa eldoc-cmake cpputils-cmake)) - '(warning-suppress-types '((initialization) (defvaralias)))) -(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. - ) -(put 'customize-group 'disabled nil) diff --git a/doomemacs/.config/doom/init.el b/doomemacs/.config/doom/init.el index 03099fc..25be9f6 100644 --- a/doomemacs/.config/doom/init.el +++ b/doomemacs/.config/doom/init.el @@ -22,31 +22,31 @@ :completion 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 ; a search engine for love and life - ;; vertico ; the search engine of the future + ;;vertico ; the search engine of the future :ui ;;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) ; 🙂 + ;;(emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra ;;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 + ;;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 neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows tabs ; a tab bar for Emacs - ;; treemacs ; a project drawer, like neotree but cooler + ;;treemacs ; a project drawer, like neotree but cooler unicode ; extended unicode support for various languages - ;; vc-gutter ; vcs diff in the fringe + (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 +56,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 format ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim @@ -70,9 +70,10 @@ :emacs 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 + vc ; version-control and Emacs, sitting in a tree :term ;;eshell ; the elisp shell that works everywhere @@ -82,35 +83,33 @@ :checkers syntax ; tasing you for every semicolon you forget - (spell +flyspell) ; tasing you for misspelling mispelling - grammar ; tasing grammar mistake every you make + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible - biblio ; Writes a PhD for you (citation needed) + ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends ;;debugger ; FIXME stepping through code, to help you add bugs ;;direnv ;;docker - editorconfig ; let someone else argue about tabs vs spaces + ;;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 lookup ; navigate your code and its documentation - lsp ; M-x vscode + ;;lsp ; M-x vscode magit ; a git porcelain for Emacs - make ; run make tasks from Emacs + ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds - pdf ; pdf enhancements + ;;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 @@ -121,8 +120,8 @@ 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 - ;;data ; config/data formats + csharp ; unity, .NET, and mono shenanigans + data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall ;;elixir ; erlang done right @@ -149,31 +148,32 @@ 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 +lsp) ; 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 + ;;nim ; python + lisp at the speed of c nix ; I hereby declare "nix geht mehr!" - ocaml ; an objective camel + ;;ocaml ; an objective camel org ; organize your plain life in plain text php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more - ;; purescript ; javascript, but functional - (python +lsp) ; beautiful is better than ugly + ;;graphviz ; diagrams for confusing yourself even more + ;;purescript ; javascript, but functional + python ; 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 +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() (scala +lsp) ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No. - (swift +lsp) ; who asked for emoji variables? + ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes + ;;web ; the tubes yaml ; JSON, but readable (zig +lsp) ; C, but simpler @@ -188,12 +188,7 @@ ;;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 :config ;;literate (default +bindings +smartparens)) - - -(after! lsp-pyls - (setq lsp-pyls-plugins-pycodestyle-ignore '("E501"))) diff --git a/doomemacs/.config/doom/packages.el b/doomemacs/.config/doom/packages.el index c5bb8e5..f01851f 100644 --- a/doomemacs/.config/doom/packages.el +++ b/doomemacs/.config/doom/packages.el @@ -7,49 +7,46 @@ ;; 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/radian-software/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) +;; (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 radian-software/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) +;; (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! copilot -;; :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) +;; (unpin! t) (package! drag-stuff)