Some cleanup and remove Magit version pin

This commit is contained in:
Leni Ven 2023-04-18 01:50:28 -07:00
parent 0a2138a831
commit e06a195b43
1 changed files with 72 additions and 37 deletions

View File

@ -8,6 +8,7 @@ Dependencies:
- Doom Emacs: ~git~ ~ripgrep~, ~fd-find~
- ~lilypond-mode~: ~LilyPond~
- ~:app everywhere~: ~xwininfo~, ~xdotool~, ~xclip~, ~xprop~
- Font: Source Code Pro
Individual packages may have other optional dependencies. Execute ~doom doctor~ to find out.
The following block of comments is from the default configuration.
@ -152,6 +153,10 @@ Modifications to the default key bindings to mimic spacemacs
(map! :leader
:desc "Kill buffer and window"
"b 0" #'kill-buffer-and-window)
(map! :leader
(:prefix ("S" . "Set")
:desc "Input method" "i" #'set-input-method
))
(map! :nvi "C" nil) ; remove this one weird binding
#+end_src
@ -193,6 +198,7 @@ available. You can either set ~doom-theme~ or manually load a theme with the
:family default-font
:size default-font-size)
doom-theme 'doom-lantern)
(add-to-list 'default-frame-alist '(alpha . 90))
#+end_src
** Splash Screen
@ -215,6 +221,7 @@ available. You can either set ~doom-theme~ or manually load a theme with the
"\n"))
'face 'doom-dashboard-banner)))
(setq +doom-dashboard-ascii-banner-fn #'custom/doom-banner)
(set-face-font 'doom-dashboard-banner (font-spec :family "Source Code Pro" :foundry "ADBO"))
#+end_src
** Line numbers
@ -238,7 +245,8 @@ numbers are disabled. For relative line numbers, set this to ~relative~.
(setq
indent-tabs-mode t
indent-line-function 'tab-to-tab-stop
tab-width 3)
tab-width 3
standard-indent 3)
(indent-tabs-mode)
(smart-tabs-mode-enable)
)
@ -272,7 +280,8 @@ numbers are disabled. For relative line numbers, set this to ~relative~.
(setq-default
indent-tabs-mode t
indent-line-function 'tab-to-tab-stop
tab-width 3)
tab-width 3
standard-indent 3)
#+end_src
*** Whitespace mode
@ -330,7 +339,8 @@ Note that ~onsave~ was intentionally turned off because it messes with version c
(defun custom/lisp-family-hook ()
(setq
indent-line-function 'tab-to-tab-stop
tab-width 3)
tab-width 3
standard-indent 3)
(indent-tabs-mode)
(display-line-numbers-mode)
)
@ -462,8 +472,33 @@ introduced.
)
#+end_src
*** Lean 3
#+begin_src emacs-lisp
(add-hook! lean-mode
(activate-input-method 'Lean)
(if (not indent-tabs-mode)
(indent-tabs-mode))
)
(map! :after lean-mode
:localleader
:map lean-mode-map
:desc "Show symbol keystrokes" "k" #'quail-show-key
)
(map! :after lean-mode
:map TeX-mode-map
:g "C-c C-k" nil
:g "C-c C-r" nil
:g "C-c C-s" nil
:g "C-c C-g" nil
:g "C-c SPC" nil
)
#+end_src
*** Lean 4
Lean 4 is still volatile and under construction.
#+begin_src emacs-lisp :tangle packages.el
(package! lean4-mode :recipe (
:host github
@ -495,35 +530,46 @@ introduced.
Add the necessary hooks for LilyPond mode.
FIXME: Defer initialisation
#+begin_src emacs-lisp
(use-package! lilypond-mode
:init
(print! "Initializing LilyPond-mode")
(add-to-list 'auto-mode-alist '("\\.ly\\'" . LilyPond-mode))
;:after-call LilyPond-mode
:mode ("\\.ly\\'" . LilyPond-mode)
:after-call LilyPond-mode
:config
(add-hook 'LilyPond-mode-hook #'custom/common-program-hook)
)
(add-hook 'LilyPond-mode-hook #'custom/common-program-hook))
(map! :after lilypond-mode
:localleader
:map LilyPond-mode-map
:desc "Info" "I" #'LilyPond-info
:desc "Info Index Search" "i" #'LilyPond-info-index-search
:desc "Comment/Uncomment" ";" #'LilyPond-comment-region
:desc "What beat" "b" #'LilyPond-what-beat
:desc "Play midi" "m" #'LilyPond-command-current-midi
:desc "Quick insert mode" "q" #'LilyPond-quick-insert-mode
:desc "Insert tag current" "t" #'LilyPond-insert-tag-current
(:prefix ("c" . "command")
:desc "Buffer" "b" #'LilyPond-command-buffer
:desc "Master" "r" #'LilyPond-command-master
:desc "LilyPond" "l" #'LilyPond-command-lilypond
:desc "Format ps" "p" #'LilyPond-command-formatps
:desc "Format midi" "m" #'LilyPond-command-formatmidi
:desc "Kill jobs" "k" #'LilyPond-kill-jobs
)
)
#+end_src
** Tools
*** LSP
*** Language Server Protocol (LSP)
File path is removed from breadcrumb since it is provided by ~doom-modeline~ and
since it clutters the header-line.
#+begin_src emacs-lisp
(after! lsp-mode
(print! "Configuring (after! lsp-mode ...)")
(setq
lsp-headerline-breadcrumb-enable t
lsp-headerline-breadcrumb-enable-symbol-numbers nil
lsp-headerline-breadcrumb-segments '(symbols)
))
(setq-hook! lsp-mode
lsp-headerline-breadcrumb-enable t
lsp-headerline-breadcrumb-enable-symbol-numbers nil
lsp-headerline-breadcrumb-segments '(symbols)
)
#+end_src
*** Magit
@ -537,25 +583,13 @@ since it clutters the header-line.
)
#+end_src
Temporarily pin the versions at 28.2 due to ~defvar-keymap~ being a Emacs 29
addition. See [[https://emacs.stackexchange.com/questions/75827/doom-emacs-error-running-hook-global-git-commit-mode-because-void-variable][this stackexchange post]].
#+begin_src emacs-lisp :tangle packages.el
(package! transient
:pin "c2bdf7e12c530eb85476d3aef317eb2941ab9440"
:recipe (:host github :repo "magit/transient"))
(package! with-editor
:pin "bbc60f68ac190f02da8a100b6fb67cf1c27c53ab"
:recipe (:host github :repo "magit/with-editor"))
#+end_src
*** Emacs IPython Notebook (ein)
Adapted from [[https://gist.github.com/millejoh/8632402a11384a3a0949fa350a1a271b]]
Usage: Since ~ein:notebooklist-mode~, ~ein:markdown-mode~, and
~ein:traceback-mode~ are major modes, their hotkeys are triggered by the local
leader ~,~/~SPC m~. However the ~ein:notebook-mode~ and
leader ~,~ / ~SPC m~. However the ~ein:notebook-mode~ and
~ein:notebook-multilang-mode~ are minor modes and they are triggered by ~C-c~
instead of ~,~.
@ -615,11 +649,12 @@ FIXME: Cleanup ~ein:markdown-mode-map~.
:desc "Move prev" "H" #'ein:notebook-worksheet-move-prev
:desc "Move next" "L" #'ein:notebook-worksheet-move-next
(:prefix ("o" . "Output")
:desc "Toggle output" "t" #'ein:worksheet-toggle-output-km
:desc "Clear output" "c" #'ein:worksheet-clear-output
:desc "Clear all output" "C" #'ein:worksheet-clear-all-output
:desc "Toggle output" "t" #'ein:worksheet-toggle-output-km
:desc "Show traceback" "T" #'ein:tb-show-km
:desc "Clear output" "c" #'ein:worksheet-clear-output
:desc "Clear all output" "C" #'ein:worksheet-clear-all-output
:desc "Set output visibility" "v" #'ein:worksheet-set-output-visibility-all-km
:desc "Show code cell" "s" #'ein:shared-output-show-code-cell-at-point-km
:desc "Show code cell" "s" #'ein:shared-output-show-code-cell-at-point-km
)
(:prefix ("e" . "Execute")
:desc "All cells" "a" #'ein:worksheet-execute-all-cells