562 lines
28 KiB
EmacsLisp
562 lines
28 KiB
EmacsLisp
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||
|
|
||
|
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||
|
;; sync' after modifying this file!
|
||
|
|
||
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||
|
;; clients, file temp+bindingslates and snippets. It is optional.
|
||
|
(setq user-full-name "Matt Nish-Lapidus"
|
||
|
user-mail-address "matt@emenel.ca")
|
||
|
|
||
|
;; See 'C-h v doom-font' for documentation and more examples of what they
|
||
|
;; accept. For example:
|
||
|
(setq doom-font (font-spec :family "JetBrains Mono" :size 14))
|
||
|
|
||
|
;; 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-monokai-pro)
|
||
|
|
||
|
;; 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)
|
||
|
(setq scroll-preserve-screen-position t)
|
||
|
|
||
|
;; Modeline
|
||
|
;; - add current workspace name
|
||
|
;; - add major mode icon
|
||
|
(after! doom-modeline
|
||
|
(setq doom-modeline-persp-name t
|
||
|
doom-modeline-major-mode-icon t))
|
||
|
|
||
|
(setq doom-localleader-alt-key "C-SPC")
|
||
|
|
||
|
(map! :leader "`" nil)
|
||
|
|
||
|
(setq aw-dispatch-always t)
|
||
|
|
||
|
(map! :leader
|
||
|
|
||
|
(:prefix-map ("!" . "checkers")) ; bound by flycheck
|
||
|
|
||
|
:desc "M-x" ":" #'execute-extended-command
|
||
|
:desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer
|
||
|
:desc "Universal argument" "u" #'universal-argument
|
||
|
|
||
|
(:prefix-map ("w" . "window")
|
||
|
:desc "ace-window" "w" #'ace-window
|
||
|
:desc "split horizontally" "h" #'split-window-below
|
||
|
:desc "split vertically" "v" #'split-window-below
|
||
|
:desc "make taller" "+" #'enlarge-window
|
||
|
:desc "make taller" "-" #'shrink-window
|
||
|
:desc "make wider" ">" #'enlarge-window-horizontally
|
||
|
:desc "make narrower" "<" #'shrink-window-horizontally
|
||
|
:desc "delete current window" "d" #'delete-window)
|
||
|
|
||
|
:desc "help" "h" help-map
|
||
|
|
||
|
(:when (modulep! :ui popup)
|
||
|
:desc "Toggle last popup" "~" #'+popup/toggle)
|
||
|
:desc "Find file" "." #'find-file
|
||
|
:desc "Switch buffer" "," #'switch-to-buffer
|
||
|
(:when (modulep! :ui workspaces)
|
||
|
:desc "Switch workspace buffer" "," #'persp-switch-to-buffer
|
||
|
:desc "Switch buffer" "<" #'switch-to-buffer)
|
||
|
:desc "Resume last search" "'"
|
||
|
(cond ((modulep! :completion vertico) #'vertico-repeat)
|
||
|
((modulep! :completion ivy) #'ivy-resume)
|
||
|
((modulep! :completion helm) #'helm-resume))
|
||
|
|
||
|
:desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point
|
||
|
:desc "Search project" "/" #'+default/search-project
|
||
|
|
||
|
:desc "Find file in project" "SPC" #'projectile-find-file
|
||
|
:desc "Jump to bookmark" "RET" #'bookmark-jump
|
||
|
|
||
|
(:prefix-map ("TAB" . "workspace")
|
||
|
:desc "Display tab bar" "TAB" #'+workspace/display
|
||
|
:desc "Switch workspace" "." #'+workspace/switch-to
|
||
|
:desc "Switch to last workspace" "`" #'+workspace/other
|
||
|
:desc "New workspace" "n" #'+workspace/new
|
||
|
:desc "New named workspace" "N" #'+workspace/new-named
|
||
|
:desc "Load workspace from file" "l" #'+workspace/load
|
||
|
:desc "Save workspace to file" "s" #'+workspace/save
|
||
|
:desc "Delete session" "x" #'+workspace/kill-session
|
||
|
:desc "Delete this workspace" "d" #'+workspace/delete
|
||
|
:desc "Rename workspace" "r" #'+workspace/rename
|
||
|
:desc "Restore last session" "R" #'+workspace/restore-last-session
|
||
|
:desc "Next workspace" "]" #'+workspace/switch-right
|
||
|
:desc "Previous workspace" "[" #'+workspace/switch-left
|
||
|
:desc "Switch to 1st workspace" "1" #'+workspace/switch-to-0
|
||
|
:desc "Switch to 2nd workspace" "2" #'+workspace/switch-to-1
|
||
|
:desc "Switch to 3rd workspace" "3" #'+workspace/switch-to-2
|
||
|
:desc "Switch to 4th workspace" "4" #'+workspace/switch-to-3
|
||
|
:desc "Switch to 5th workspace" "5" #'+workspace/switch-to-4
|
||
|
:desc "Switch to 6th workspace" "6" #'+workspace/switch-to-5
|
||
|
:desc "Switch to 7th workspace" "7" #'+workspace/switch-to-6
|
||
|
:desc "Switch to 8th workspace" "8" #'+workspace/switch-to-7
|
||
|
:desc "Switch to 9th workspace" "9" #'+workspace/switch-to-8
|
||
|
:desc "Switch to final workspace" "0" #'+workspace/switch-to-final)
|
||
|
|
||
|
(:prefix-map ("f" . "file")
|
||
|
:desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig
|
||
|
:desc "Copy this file" "C" #'doom/copy-this-file
|
||
|
:desc "Find directory" "d" #'+default/dired
|
||
|
:desc "Delete this file" "D" #'doom/delete-this-file
|
||
|
:desc "Find file in emacs.d" "e" #'doom/find-file-in-emacsd
|
||
|
:desc "Browse emacs.d" "E" #'doom/browse-in-emacsd
|
||
|
:desc "Find file" "f" #'find-file
|
||
|
:desc "Find file from here" "F" #'+default/find-file-under-here
|
||
|
:desc "Locate file" "l" #'locate
|
||
|
:desc "Find file in private config" "p" #'doom/find-file-in-private-config
|
||
|
:desc "Browse private config" "P" #'doom/open-private-config
|
||
|
:desc "Recent files" "r" #'recentf-open-files
|
||
|
:desc "Rename/move file" "R" #'doom/move-this-file
|
||
|
:desc "Save file" "s" #'save-buffer
|
||
|
:desc "Save file as..." "S" #'write-file
|
||
|
:desc "Sudo find file" "u" #'doom/sudo-find-file
|
||
|
:desc "Sudo this file" "U" #'doom/sudo-this-file
|
||
|
:desc "Yank file path" "y" #'+default/yank-buffer-path
|
||
|
:desc "Yank file path from project" "Y" #'+default/yank-buffer-path-relative-to-project)
|
||
|
|
||
|
(:prefix-map ("p" . "project")
|
||
|
:desc "Browse project" "." #'+default/browse-project
|
||
|
:desc "Browse other project" ">" #'doom/browse-in-other-project
|
||
|
:desc "Run cmd in project root" "!" #'projectile-run-shell-command-in-root
|
||
|
:desc "Async cmd in project root" "&" #'projectile-run-async-shell-command-in-root
|
||
|
:desc "Add new project" "a" #'projectile-add-known-project
|
||
|
:desc "Switch to project buffer" "b" #'projectile-switch-to-buffer
|
||
|
:desc "Compile in project" "c" #'projectile-compile-project
|
||
|
:desc "Repeat last command" "C" #'projectile-repeat-last-command
|
||
|
:desc "Remove known project" "d" #'projectile-remove-known-project
|
||
|
:desc "Discover projects in folder" "D" #'+default/discover-projects
|
||
|
:desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals
|
||
|
:desc "Find file in project" "f" #'projectile-find-file
|
||
|
:desc "Find file in other project" "F" #'doom/find-file-in-other-project
|
||
|
:desc "Configure project" "g" #'projectile-configure-project
|
||
|
:desc "Invalidate project cache" "i" #'projectile-invalidate-cache
|
||
|
:desc "Kill project buffers" "k" #'projectile-kill-buffers
|
||
|
:desc "Find other file" "o" #'projectile-find-other-file
|
||
|
:desc "Switch project" "p" #'projectile-switch-project
|
||
|
:desc "Find recent project files" "r" #'projectile-recentf
|
||
|
:desc "Run project" "R" #'projectile-run-project
|
||
|
:desc "Save project files" "s" #'projectile-save-project-buffers
|
||
|
:desc "List project todos" "t" #'magit-todos-list
|
||
|
:desc "Test project" "T" #'projectile-test-project
|
||
|
:desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer
|
||
|
:desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
|
||
|
(:when (and (modulep! :tools taskrunner)
|
||
|
(or (modulep! :completion ivy)
|
||
|
(modulep! :completion helm)))
|
||
|
:desc "List project tasks" "z" #'+taskrunner/project-tasks))
|
||
|
|
||
|
|
||
|
;;; <leader> s --- search
|
||
|
(:prefix-map ("s" . "search")
|
||
|
:desc "Search buffer" "b"
|
||
|
(cond ((modulep! :completion vertico) #'+default/search-buffer)
|
||
|
((modulep! :completion ivy) #'swiper)
|
||
|
((modulep! :completion helm) #'swiper))
|
||
|
:desc "Search all open buffers" "B"
|
||
|
(cond ((modulep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers))
|
||
|
((modulep! :completion ivy) #'swiper-all)
|
||
|
((modulep! :completion helm) #'swiper-all))
|
||
|
:desc "Search current directory" "d" #'+default/search-cwd
|
||
|
:desc "Search other directory" "D" #'+default/search-other-cwd
|
||
|
:desc "Search .emacs.d" "e" #'+default/search-emacsd
|
||
|
:desc "Locate file" "f" #'locate
|
||
|
:desc "Jump to symbol" "i" #'imenu
|
||
|
:desc "Jump to visible link" "l" #'link-hint-open-link
|
||
|
:desc "Jump to link" "L" #'ffap-menu
|
||
|
;; :desc "Jump list" "j" #'evil-show-jumps
|
||
|
:desc "Jump to bookmark" "m" #'bookmark-jump
|
||
|
:desc "Look up online" "o" #'+lookup/online
|
||
|
:desc "Look up online (w/ prompt)" "O" #'+lookup/online-select
|
||
|
:desc "Look up in local docsets" "k" #'+lookup/in-docsets
|
||
|
:desc "Look up in all docsets" "K" #'+lookup/in-all-docsets
|
||
|
:desc "Search project" "p" #'+default/search-project
|
||
|
:desc "Search other project" "P" #'+default/search-other-project
|
||
|
;; :desc "Jump to mark" "r" #'evil-show-marks
|
||
|
:desc "Search buffer" "s" #'+default/search-buffer
|
||
|
:desc "Search buffer for thing at point" "S"
|
||
|
(cond ((modulep! :completion vertico) #'+vertico/search-symbol-at-point)
|
||
|
((modulep! :completion ivy) #'swiper-isearch-thing-at-point)
|
||
|
((modulep! :completion helm) #'swiper-isearch-thing-at-point))
|
||
|
:desc "Dictionary" "t" #'+lookup/dictionary-definition
|
||
|
:desc "Thesaurus" "T" #'+lookup/synonyms)
|
||
|
|
||
|
|
||
|
;;; <leader> t --- toggle
|
||
|
(:prefix-map ("t" . "toggle")
|
||
|
:desc "Big mode" "b" #'doom-big-font-mode
|
||
|
:desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode
|
||
|
:desc "Flymake" "f" #'flymake-mode
|
||
|
(:when (modulep! :checkers syntax)
|
||
|
:desc "Flycheck" "f" #'flycheck-mode)
|
||
|
:desc "Frame fullscreen" "F" #'toggle-frame-fullscreen
|
||
|
;; :desc "Evil goggles" "g" #'evil-goggles-mode
|
||
|
(:when (modulep! :ui indent-guides)
|
||
|
:desc "Indent guides" "i" #'highlight-indent-guides-mode)
|
||
|
:desc "Indent style" "I" #'doom/toggle-indent-style
|
||
|
:desc "Line numbers" "l" #'doom/toggle-line-numbers
|
||
|
(:when (modulep! :ui minimap)
|
||
|
:desc "Minimap" "m" #'minimap-mode)
|
||
|
(:when (modulep! :lang org +present)
|
||
|
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
|
||
|
:desc "Read-only mode" "r" #'read-only-mode
|
||
|
(:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell)))
|
||
|
:desc "Spell checker" "s" #'spell-fu-mode)
|
||
|
(:when (modulep! :checkers spell +flyspell)
|
||
|
:desc "Spell checker" "s" #'flyspell-mode)
|
||
|
(:when (modulep! :lang org +pomodoro)
|
||
|
:desc "Pomodoro timer" "t" #'org-pomodoro)
|
||
|
:desc "Visible mode" "v" #'visible-mode
|
||
|
:desc "Soft line wrapping" "w" #'visual-line-mode
|
||
|
(:when (modulep! :editor word-wrap)
|
||
|
:desc "Soft line wrapping" "w" #'+word-wrap-mode)
|
||
|
(:when (modulep! :ui zen)
|
||
|
:desc "Zen mode" "z" #'+zen/toggle
|
||
|
:desc "Zen mode (fullscreen)" "Z" #'+zen/toggle-fullscreen))
|
||
|
|
||
|
(:prefix-map ("o" . "open")
|
||
|
:desc "Start debugger" "d" #'+debugger/start
|
||
|
:desc "New frame" "f" #'make-frame
|
||
|
:desc "Select frame" "F" #'select-frame-by-name
|
||
|
:desc "REPL" "r" #'+eval/open-repl-other-window
|
||
|
:desc "REPL (same window)" "R" #'+eval/open-repl-same-window
|
||
|
:desc "Dired" "-" #'dired-jump
|
||
|
(:when (modulep! :ui neotree)
|
||
|
:desc "Project sidebar" "p" #'+neotree/open
|
||
|
:desc "Find file in project sidebar" "P" #'+neotree/find-this-file)
|
||
|
(:when (modulep! :ui treemacs)
|
||
|
:desc "Project sidebar" "p" #'+treemacs/toggle
|
||
|
:desc "Find file in project sidebar" "P" #'treemacs-find-file)
|
||
|
(:when (modulep! :term shell)
|
||
|
:desc "Toggle shell popup" "t" #'+shell/toggle
|
||
|
:desc "Open shell here" "T" #'+shell/here)
|
||
|
(:when (modulep! :term term)
|
||
|
:desc "Toggle terminal popup" "t" #'+term/toggle
|
||
|
:desc "Open terminal here" "T" #'+term/here)
|
||
|
(:when (modulep! :term vterm)
|
||
|
:desc "Toggle vterm popup" "t" #'+vterm/toggle
|
||
|
:desc "Open vterm here" "T" #'+vterm/here)
|
||
|
(:when (modulep! :term eshell)
|
||
|
:desc "Toggle eshell popup" "e" #'+eshell/toggle
|
||
|
:desc "Open eshell here" "E" #'+eshell/here)
|
||
|
(:when (modulep! :os macos)
|
||
|
:desc "Reveal in Finder" "o" #'+macos/reveal-in-finder
|
||
|
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
|
||
|
:desc "Send to Transmit" "u" #'+macos/send-to-transmit
|
||
|
:desc "Send project to Transmit" "U" #'+macos/send-project-to-transmit
|
||
|
:desc "Send to Launchbar" "l" #'+macos/send-to-launchbar
|
||
|
:desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar
|
||
|
:desc "Open in iTerm" "i" #'+macos/open-in-iterm
|
||
|
:desc "Open in new iTerm window" "I" #'+macos/open-in-iterm-new-window)
|
||
|
(:when (modulep! :tools docker)
|
||
|
:desc "Docker" "D" #'docker)
|
||
|
(:when (modulep! :email mu4e)
|
||
|
:desc "mu4e" "m" #'=mu4e)
|
||
|
(:when (modulep! :email notmuch)
|
||
|
:desc "notmuch" "m" #'=notmuch)
|
||
|
(:when (modulep! :email wanderlust)
|
||
|
:desc "wanderlust" "m" #'=wanderlust))
|
||
|
|
||
|
(:prefix-map ("n" . "notes")
|
||
|
:desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point
|
||
|
(:when (modulep! :tools biblio)
|
||
|
:desc "Bibliographic notes" "b"
|
||
|
(cond ((modulep! :completion vertico) #'citar-open-notes)
|
||
|
((modulep! :completion ivy) #'ivy-bibtex)
|
||
|
((modulep! :completion helm) #'helm-bibtex)))
|
||
|
|
||
|
:desc "Find file in notes" "f" #'+default/find-in-notes
|
||
|
:desc "Browse notes" "F" #'+default/browse-notes)
|
||
|
|
||
|
(:prefix-map ("g" . "git")
|
||
|
:desc "Revert file" "R" #'vc-revert
|
||
|
:desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill
|
||
|
:desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||
|
(:when (modulep! :ui hydra)
|
||
|
:desc "SMerge" "m" #'+vc/smerge-hydra/body)
|
||
|
(:when (modulep! :ui vc-gutter)
|
||
|
(:when (modulep! :ui hydra)
|
||
|
:desc "VCGutter" "." #'+vc/gutter-hydra/body)
|
||
|
:desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk
|
||
|
:desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk
|
||
|
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||
|
:desc "Jump to next hunk" "]" #'+vc-gutter/next-hunk
|
||
|
:desc "Jump to previous hunk" "[" #'+vc-gutter/previous-hunk)
|
||
|
(:when (modulep! :tools magit)
|
||
|
:desc "Magit dispatch" "/" #'magit-dispatch
|
||
|
:desc "Magit file dispatch" "." #'magit-file-dispatch
|
||
|
:desc "Forge dispatch" "'" #'forge-dispatch
|
||
|
:desc "Magit switch branch" "b" #'magit-branch-checkout
|
||
|
:desc "Magit status" "g" #'magit-status
|
||
|
:desc "Magit status here" "G" #'magit-status-here
|
||
|
:desc "Magit file delete" "D" #'magit-file-delete
|
||
|
:desc "Magit blame" "B" #'magit-blame-addition
|
||
|
:desc "Magit clone" "C" #'magit-clone
|
||
|
:desc "Magit fetch" "F" #'magit-fetch
|
||
|
:desc "Magit buffer log" "L" #'magit-log-buffer-file
|
||
|
:desc "Git stage file" "S" #'magit-stage-file
|
||
|
:desc "Git unstage file" "U" #'magit-unstage-file
|
||
|
(:prefix ("f" . "find")
|
||
|
:desc "Find file" "f" #'magit-find-file
|
||
|
:desc "Find gitconfig file" "g" #'magit-find-git-config-file
|
||
|
:desc "Find commit" "c" #'magit-show-commit
|
||
|
:desc "Find issue" "i" #'forge-visit-issue
|
||
|
:desc "Find pull request" "p" #'forge-visit-pullreq)
|
||
|
(:prefix ("o" . "open in browser")
|
||
|
:desc "Browse file or region" "o" #'+vc/browse-at-remote
|
||
|
:desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage
|
||
|
:desc "Browse remote" "r" #'forge-browse-remote
|
||
|
:desc "Browse commit" "c" #'forge-browse-commit
|
||
|
:desc "Browse an issue" "i" #'forge-browse-issue
|
||
|
:desc "Browse a pull request" "p" #'forge-browse-pullreq
|
||
|
:desc "Browse issues" "I" #'forge-browse-issues
|
||
|
:desc "Browse pull requests" "P" #'forge-browse-pullreqs)
|
||
|
(:prefix ("l" . "list")
|
||
|
(:when (modulep! :tools gist)
|
||
|
:desc "List gists" "g" #'+gist:list)
|
||
|
:desc "List repositories" "r" #'magit-list-repositories
|
||
|
:desc "List submodules" "s" #'magit-list-submodules
|
||
|
:desc "List issues" "i" #'forge-list-issues
|
||
|
:desc "List pull requests" "p" #'forge-list-pullreqs
|
||
|
:desc "List notifications" "n" #'forge-list-notifications)
|
||
|
(:prefix ("c" . "create")
|
||
|
:desc "Initialize repo" "r" #'magit-init
|
||
|
:desc "Clone repo" "R" #'magit-clone
|
||
|
:desc "Commit" "c" #'magit-commit-create
|
||
|
:desc "Fixup" "f" #'magit-commit-fixup
|
||
|
:desc "Branch" "b" #'magit-branch-and-checkout
|
||
|
:desc "Issue" "i" #'forge-create-issue
|
||
|
:desc "Pull request" "p" #'forge-create-pullreq)))
|
||
|
|
||
|
(:prefix-map ("c" . "code")
|
||
|
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||
|
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||
|
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||
|
(:when (modulep! :completion ivy)
|
||
|
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
|
||
|
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
|
||
|
(:when (modulep! :completion helm)
|
||
|
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol
|
||
|
:desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
|
||
|
(:when (modulep! :completion vertico)
|
||
|
:desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols
|
||
|
:desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces))
|
||
|
(:when (modulep! :ui treemacs +lsp)
|
||
|
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||
|
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||
|
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||
|
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)
|
||
|
:desc "Symbols" "S" #'lsp-treemacs-symbols)
|
||
|
:desc "LSP" "l" #'+default/lsp-command-map
|
||
|
:desc "LSP Rename" "r" #'lsp-rename)
|
||
|
(:when (modulep! :tools lsp +eglot)
|
||
|
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||
|
:desc "LSP Rename" "r" #'eglot-rename
|
||
|
:desc "LSP Find declaration" "j" #'eglot-find-declaration
|
||
|
(:when (modulep! :completion vertico)
|
||
|
:desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols))
|
||
|
:desc "Compile" "c" #'compile
|
||
|
:desc "Recompile" "C" #'recompile
|
||
|
:desc "Jump to definition" "d" #'+lookup/definition
|
||
|
:desc "Jump to references" "D" #'+lookup/references
|
||
|
:desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region
|
||
|
:desc "Evaluate & replace region" "E" #'+eval:replace-region
|
||
|
:desc "Format buffer/region" "f" #'+format/region-or-buffer
|
||
|
:desc "Find implementations" "i" #'+lookup/implementations
|
||
|
:desc "Jump to documentation" "k" #'+lookup/documentation
|
||
|
:desc "Send to repl" "s" #'+eval/send-region-to-repl
|
||
|
:desc "Find type definition" "t" #'+lookup/type-definition
|
||
|
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
|
||
|
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
|
||
|
:desc "List errors" "x" #'+default/diagnostics)
|
||
|
)
|
||
|
|
||
|
(after! which-key
|
||
|
(let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key))))
|
||
|
(cl-pushnew `((,(format "\\`\\(?:C-w\\|%s w\\) m\\'" prefix-re))
|
||
|
nil . "maximize")
|
||
|
which-key-replacement-alist)))
|
||
|
|
||
|
(map! "s-c" #'kill-ring-save
|
||
|
"s-v" #'yank
|
||
|
"s-x" #'kill-region
|
||
|
"s-a" #'mark-whole-buffer
|
||
|
"s-z" #'undo
|
||
|
"s-w" #'kill-buffer
|
||
|
"s-f" #'+default/search-buffer
|
||
|
"M-s-]" #'next-window-any-frame
|
||
|
"M-s-[" #'previous-window-any-frame
|
||
|
;; "M-s-<up>" #'backward-paragraph
|
||
|
;; "M-s-<down>" #'forward-paragraph
|
||
|
"s-<up>" #'beginning-of-buffer
|
||
|
"s-<down>" #'end-of-buffer
|
||
|
"M-s-v" #'consult-yank-from-kill-ring)
|
||
|
|
||
|
(cond
|
||
|
((string-equal system-type "darwin")
|
||
|
(setq frame-resize-pixelwise t
|
||
|
window-resize-pixelwise t)))
|
||
|
|
||
|
(setq treemacs-follow-mode t)
|
||
|
(setq treemacs-project-follow-mode t)
|
||
|
|
||
|
(setq-default indent-tabs-mode t)
|
||
|
(setq-default tab-width 2)
|
||
|
|
||
|
(defalias 'compat-string-width 'string-width)
|
||
|
|
||
|
(after! smart-tabs-mode
|
||
|
(smart-tabs-insinuate 'c 'javascript 'python))
|
||
|
|
||
|
(after! lsp-mode
|
||
|
(setq lsp-completion-provider :none)
|
||
|
(setq lsp-signature-render-documentation nil)
|
||
|
(setq lsp-completion-show-kind t)
|
||
|
|
||
|
(defun my/lsp-mode-setup-completion ()
|
||
|
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
|
||
|
'(orderless))) ;; Configure orderless
|
||
|
(add-hook! lsp-completion-mode 'my/lsp-mode-setup-completion))
|
||
|
|
||
|
(setq! citar-bibliography '("/Users/emenel/Zotero/lib.bib"))
|
||
|
|
||
|
(after! lisp-mode
|
||
|
(setq lsp-completion-provider :none))
|
||
|
|
||
|
;; svelte support
|
||
|
(add-to-list 'auto-mode-alist '("\\.svelte\\'" . web-mode))
|
||
|
(setq web-mode-engines-alist
|
||
|
'(("svelte" . "\\.svelte\\'")))
|
||
|
|
||
|
(after! web-mode
|
||
|
(map! :map web-mode-map
|
||
|
"M-s-." 'web-mode-element-close))
|
||
|
|
||
|
(add-hook! web-mode (web-mode-use-tabs) (setq indent-tabs-mode t))
|
||
|
|
||
|
(after! centaur-tabs
|
||
|
(setq centaur-tabs-set-bar 'right)
|
||
|
(setq centaur-tabs-cycle-scope 'tabs)
|
||
|
(map! :map centaur-tabs-mode-map
|
||
|
"s-M-<right>" 'centaur-tabs-forward
|
||
|
"s-M-<left>" 'centaur-tabs-backward))
|
||
|
|
||
|
(use-package! moom
|
||
|
:load-path "/Users/emenel/Source/_src/moom"
|
||
|
:after-call doom-after-init-hook
|
||
|
:config
|
||
|
(setq moom-use-font-module nil)
|
||
|
(moom-recommended-keybindings '(all wof))
|
||
|
(setq moom-user-margin '(50 50 50 50))
|
||
|
(setq moom-command-with-centering '(single double delete split))
|
||
|
(when (display-graphic-p) (defun my-moom-default-frame-size () (set-frame-width (selected-frame) 150) (set-frame-height (selected-frame) 48) (moom-move-frame-to-center)) (add-hook! 'moom-mode-hook #'my-moom-default-frame-size) (moom-mode 1)))
|
||
|
|
||
|
(setq terminal-here-mac-terminal-command '("kitty"))
|
||
|
|
||
|
(setq projectile-project-search-path '(("~/Source" . 2)))
|
||
|
(setq projectile-globally-ignored-buffers
|
||
|
'("*scratch*"
|
||
|
"*lsp-log*"))
|
||
|
|
||
|
;; ignoring buffers by their major mode
|
||
|
(setq projectile-globally-ignored-modes
|
||
|
'("erc-mode"
|
||
|
"help-mode"
|
||
|
"completion-list-mode"
|
||
|
"Buffer-menu-mode"
|
||
|
"gnus-.*-mode"
|
||
|
"occur-mode"))
|
||
|
|
||
|
(use-package! obsidian
|
||
|
:config
|
||
|
(obsidian-specify-path "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Primary")
|
||
|
(setq obsidian-inbox-directory "_Inbox")
|
||
|
(global-obsidian-mode t)
|
||
|
(map! :map obsidian-mode-map
|
||
|
;; Replace C-c C-o with Obsidian.el's implementation. It's ok to use another key binding.
|
||
|
"C-c C-o" #'obsidian-follow-link-at-point
|
||
|
;; Jump to backlinks
|
||
|
"C-c C-b" #'obsidian-backlink-jump
|
||
|
;; If you prefer you can use `obsidian-insert-link'
|
||
|
"C-c C-l" #'obsidian-insert-wikilink))
|
||
|
|
||
|
(defun mnl/obsidian-capture ()
|
||
|
"Create new obsidian note. In the `obsidian-inbox-directory' if set otherwise in `obsidian-directory' root."
|
||
|
(interactive)
|
||
|
(let* ((title (read-from-minibuffer "Title: " (format-time-string "%Y-%m-%d")))
|
||
|
(filename (s-concat obsidian-directory "/" obsidian-inbox-directory "/" title ".md"))
|
||
|
(clean-filename (s-replace "//" "/" filename)))
|
||
|
(find-file (expand-file-name clean-filename) t)))
|
||
|
|
||
|
(map! :leader
|
||
|
:desc "Obsidian Quick Capture"
|
||
|
"X" #'mnl/obsidian-capture)
|
||
|
|
||
|
(map! :leader
|
||
|
:prefix "n"
|
||
|
:desc "Obsidian Jump"
|
||
|
"f" #'obsidian-jump
|
||
|
:desc "Obsidian Search"
|
||
|
"s" #'obsidian-search
|
||
|
"*" #'obsidian-search
|
||
|
:desc "Obsidian Tag Search"
|
||
|
"m" #'obsidian-tag-find
|
||
|
:desc "Obsidian Capture"
|
||
|
"n" #'mnl/obsidian-capture
|
||
|
"a" nil
|
||
|
"d" nil)
|
||
|
|
||
|
(map! :after markdown-mode
|
||
|
:leader
|
||
|
:prefix "n"
|
||
|
:desc "Obsidian Insert Wikilink"
|
||
|
"l" #'obsidian-insert-wikilink
|
||
|
:desc "Obsidian Backlink Jump"
|
||
|
"j" #'obsidian-backlink-jump)
|
||
|
|
||
|
(setq org-directory "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Primary/org/")
|
||
|
|
||
|
(after! vertico
|
||
|
(vertico-mouse-mode))
|
||
|
|
||
|
(after! sly
|
||
|
(setq sly-complete-symbol-function 'sly-flex-completions))
|
||
|
|
||
|
(map! :map corfu-map [escape] 'corfu-quit)
|
||
|
|
||
|
;; cl-collider cl-patterns emacs helpers TODO: test this
|
||
|
(after! lisp-mode
|
||
|
(defun cl-patterns-helpers-load ()
|
||
|
(interactive)
|
||
|
(sly-eval-async '(cl:namestring (asdf:system-source-directory (asdf:find-system 'cl-patterns)))
|
||
|
(lambda (path)
|
||
|
(load (concat path "res/emacs/cl-patterns-helpers") nil nil nil t)
|
||
|
(load (concat path "res/emacs/cl-patterns-skeletons") nil nil nil t)))
|
||
|
;; (define-key sly-mode-map (kbd "C-c p") 'cl-patterns-play-or-end-context-or-select-pdef)
|
||
|
;; (define-key sly-mode-map (kbd "C-c P") 'cl-patterns-play-or-stop-context-or-select-pdef)
|
||
|
;; (define-key sly-mode-map (kbd "C-c s") 'cl-patterns-stop-all)
|
||
|
;; (define-key sly-doc-map (kbd "s") 'cl-patterns-supercollider-documentation))
|
||
|
(add-hook 'sly-connected-hook 'cl-patterns-helpers-load)))
|
||
|
|
||
|
(setq tidal-boot-script-path "~/.cabal/share/aarch64-osx-ghc-9.4.2/tidal-1.9.3/BootTidal.hs")
|
||
|
|
||
|
;; TODO update this for sly to use ciel by default
|
||
|
;; (setq slime-lisp-implementations
|
||
|
;; `((sbcl ("sbcl")) ;; default. Adapt if needed.
|
||
|
;; (ciel-sbcl ("sbcl" "--core" "/path/to/ciel/ciel-core" "--eval" "(in-package :ciel-user)"))))
|
||
|
;; (setq slime-default-lisp 'ciel-sbcl)
|
||
|
|
||
|
(defun mnl/remove-all-blank-lines ()
|
||
|
(flush-lines "^$"))
|
||
|
|
||
|
(+global-word-wrap-mode +1)
|
||
|
(delete-selection-mode 1)
|
||
|
(setq delete-active-region t)
|
||
|
|
||
|
;; remove org agenda from the splash screen
|
||
|
(assoc-delete-all "Open org-agenda" +doom-dashboard-menu-sections)
|