From 4843aa161c5963d97918e0378afcb2dfcc760681 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 28 Nov 2022 11:09:55 -0800 Subject: [PATCH] Doom updates --- .doom.d/config.el | 41 +++++++++++++++++++++++++++++++++++++++++ .doom.d/init.el | 31 +++++++++++++++++++------------ .doom.d/packages.el | 3 +++ .muttrc => .muttrc-old | 0 4 files changed, 63 insertions(+), 12 deletions(-) rename .muttrc => .muttrc-old (100%) diff --git a/.doom.d/config.el b/.doom.d/config.el index 33cbe86..02c5dda 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -27,6 +27,7 @@ ;; `load-theme' function. This is the default: ;(setq doom-theme 'doom-one) (setq doom-theme 'doom-nord) +(setq doom-font (font-spec :family "Liberation Mono" :size 14)) ;; 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! @@ -87,3 +88,43 @@ '(defun flymake-json-command (filename) "Construct a command that flymake can use to check json source in FILENAME." (list "jsonlint" "-V" "/Users/hunner/.doom.d/draft-07.json" "-c" "-q" filename))) + +(after! org + (add-to-list 'org-export-backends 'confluence)) + +;; for https://github.com/zerolfx/copilot.el +;; 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))) + +;; From https://github.com/hlissner/doom-emacs/issues/581 +(defun dlukes/ediff-doom-config (file) + "ediff the current config with the examples in doom-emacs-dir + +There are multiple config files, so FILE specifies which one to +diff. +" + (interactive + (list (read-file-name "Config file to diff: " doom-private-dir))) + (let* ((stem (file-name-base file)) + (customized-file (format "%s.el" stem)) + (template-file-regex (format "^%s.example.el$" stem))) + (ediff-files + (concat doom-private-dir customized-file) + (car (directory-files-recursively + doom-emacs-dir + template-file-regex + nil + (lambda (d) (not (string-prefix-p "." (file-name-nondirectory d))))))))) diff --git a/.doom.d/init.el b/.doom.d/init.el index 050db11..07ec5e7 100644 --- a/.doom.d/init.el +++ b/.doom.d/init.el @@ -14,33 +14,34 @@ ;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its ;; directory (for easy access to its source code). - (doom! :input ;;chinese ;;japanese + ;;layout ; auie,ctsrnm is the superior home row :completion - company ; the ultimate code completion backend + (company +childframe) ; the ultimate code completion backend ; XXX changed ;;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 :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 - ;;fill-column ; a `fill-column' indicator + ;;(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 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 - ;;pretty-code ; ligatures or substitute text with pretty symbols ;;tabs ; a tab bar for Emacs treemacs ; a project drawer, like neotree but cooler ; XXX Changed ;;unicode ; extended unicode support for various languages @@ -79,7 +80,7 @@ :checkers syntax ; tasing you for every semicolon you forget - ;;spell ; tasing you for misspelling mispelling + ;;(spell +flyspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools @@ -93,7 +94,6 @@ ;;gist ; interacting with github gists lookup ; navigate your code and its documentation lsp ; XXX Changed - macos ; MacOS-specific commands XXX Changed magit ; a git porcelain for Emacs make ; run make tasks from Emacs ; XXX Changed ;;pass ; password manager for nerds @@ -105,9 +105,14 @@ tmux ; an API for interacting with tmux ; XXX Changed ;;upload ; map local to remote projects via ssh/ftp + :os + (:if IS-MAC macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience ; XXX Changed + :lang ;;agda ; types of types of types of types... - ;;cc ; C/C++/Obj-C madness + ;;beancount ; mind the GAAP + ;;cc ; C > C++ == 1 ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs @@ -120,6 +125,7 @@ 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 ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 @@ -127,16 +133,15 @@ (go +lsp) ; the hipster dialect ; XXX Changed ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python - ;;idris ; + ;;idris ; a language you can depend on ;;json ; At least it ain't XML ;;(java +meghanada) ; the poster child for carpal tunnel syndrome (javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) ; XXX Changed ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) ;;latex ; writing papers in Emacs has never been so fun - ;;lean - ;;factor - ;;ledger ; an accounting system in Emacs + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c @@ -155,7 +160,7 @@ ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good - ;;scheme ; a fully conniving family of lisps + ;;(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. @@ -171,6 +176,8 @@ :app ;;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 diff --git a/.doom.d/packages.el b/.doom.d/packages.el index 918cf3f..1c056ef 100644 --- a/.doom.d/packages.el +++ b/.doom.d/packages.el @@ -50,3 +50,6 @@ ;(unpin! t) (package! puppet-mode) + +(package! copilot + :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) diff --git a/.muttrc b/.muttrc-old similarity index 100% rename from .muttrc rename to .muttrc-old