|
|
|
@@ -9,21 +9,32 @@
|
|
|
|
#+latex_class_options: [a4paper,12pt]
|
|
|
|
#+latex_class_options: [a4paper,12pt]
|
|
|
|
|
|
|
|
|
|
|
|
* Introduction
|
|
|
|
* Introduction
|
|
|
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
|
|
|
:header-args:emacs-lisp: :tangle config.el :results none
|
|
|
|
|
|
|
|
:END:
|
|
|
|
Welcome to my Emacs configuration. You may be confused by the fact
|
|
|
|
Welcome to my Emacs configuration. You may be confused by the fact
|
|
|
|
it's a readable document rather than some code; this file serves as
|
|
|
|
it's a readable document rather than some code; this file serves as
|
|
|
|
both documentation *and* code. Here's an example of some Emacs Lisp
|
|
|
|
both documentation *and* code. Here's an example of some Emacs Lisp
|
|
|
|
code:
|
|
|
|
code:
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; Copyright (C) 2024 Aryadev Chavali
|
|
|
|
;;; config.el --- Compiled configuration from config.org -*- lexical-binding: t; -*-
|
|
|
|
;; All rights reserved. You may not distribute or modify this code
|
|
|
|
|
|
|
|
;; without explicit legal permission from the author "Aryadev Chavali"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Copyright (C) 2024 Aryadev Chavali
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Author: Aryadev Chavali <aryadev@aryadevchavali.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; You may distribute and modify this code under the terms of the MIT
|
|
|
|
|
|
|
|
;; license. You should have received a copy of the MIT license with
|
|
|
|
|
|
|
|
;; this file. If not, please write to: aryadev@aryadevchavali.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;; Welcome to my Emacs configuration. This file is considered
|
|
|
|
;; Welcome to my Emacs configuration. This file is considered
|
|
|
|
;; volatile i.e. any edits made to this file will be overwritten if
|
|
|
|
;; volatile i.e. any edits made to this file will be overwritten if
|
|
|
|
;; and when the configuration is compiled again.
|
|
|
|
;; and when the configuration is compiled again.
|
|
|
|
|
|
|
|
|
|
|
|
;; To propagate edits from this file to the literate document, call
|
|
|
|
;; To propagate edits from this file to the literate document, call
|
|
|
|
;; (org-babel-detangle) while in the file.
|
|
|
|
;; (org-babel-detangle) while in the file.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
This is an Emacs Lisp code block, something you will see a *LOT* of
|
|
|
|
This is an Emacs Lisp code block, something you will see a *LOT* of
|
|
|
|
@@ -55,6 +66,7 @@ Let's setup a few things:
|
|
|
|
+ Backup files (~backup-directory-alist~)
|
|
|
|
+ Backup files (~backup-directory-alist~)
|
|
|
|
+ Refreshing buffers when a change occurs (~auto-revert-mode~)
|
|
|
|
+ Refreshing buffers when a change occurs (~auto-revert-mode~)
|
|
|
|
+ Yes or no questions being less painful (~y-or-n-p~)
|
|
|
|
+ Yes or no questions being less painful (~y-or-n-p~)
|
|
|
|
|
|
|
|
+ Make the clipboard work seamlessly with the clipboard
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package emacs
|
|
|
|
(use-package emacs
|
|
|
|
@@ -66,7 +78,8 @@ Let's setup a few things:
|
|
|
|
save-buffer-coding-system 'utf-8-unix
|
|
|
|
save-buffer-coding-system 'utf-8-unix
|
|
|
|
backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/")))
|
|
|
|
backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/")))
|
|
|
|
global-auto-revert-non-file-buffers t
|
|
|
|
global-auto-revert-non-file-buffers t
|
|
|
|
auto-revert-verbose nil)
|
|
|
|
auto-revert-verbose nil
|
|
|
|
|
|
|
|
select-enable-clipboard t)
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(fset 'yes-or-no-p 'y-or-n-p)
|
|
|
|
(fset 'yes-or-no-p 'y-or-n-p)
|
|
|
|
(global-auto-revert-mode))
|
|
|
|
(global-auto-revert-mode))
|
|
|
|
@@ -219,7 +232,7 @@ Make font size bigger on my laptop and smaller on my desktop.
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(+oreo/sys-name-cond
|
|
|
|
(+oreo/sys-name-cond
|
|
|
|
("newboy" (set-face-attribute 'default nil :height 145))
|
|
|
|
("newboy" (set-face-attribute 'default nil :height 145))
|
|
|
|
("oldboy" (set-face-attribute 'default nil :height 130))))
|
|
|
|
("oldboy" (set-face-attribute 'default nil :height 135))))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
** Startup screen
|
|
|
|
** Startup screen
|
|
|
|
The default startup screen is quite bad in all honesty. While for a
|
|
|
|
The default startup screen is quite bad in all honesty. While for a
|
|
|
|
@@ -514,11 +527,15 @@ Setup the evil package, with some opinionated keybindings:
|
|
|
|
more
|
|
|
|
more
|
|
|
|
- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have
|
|
|
|
- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have
|
|
|
|
the global one closer to the home row
|
|
|
|
the global one closer to the home row
|
|
|
|
|
|
|
|
- Push the mark when exiting visual mode
|
|
|
|
|
|
|
|
- On entering visual mode, the mark is set, so by pushing it when
|
|
|
|
|
|
|
|
exiting we can use the mark-ring for other stuff
|
|
|
|
- Use 'T' character as an action for transposing objects
|
|
|
|
- Use 'T' character as an action for transposing objects
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package evil
|
|
|
|
(use-package evil
|
|
|
|
:demand t
|
|
|
|
:demand t
|
|
|
|
:straight t
|
|
|
|
:straight t
|
|
|
|
|
|
|
|
:hook (evil-visual-state-entry-hook . push-mark)
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(leader
|
|
|
|
(leader
|
|
|
|
"w" '(evil-window-map :which-key "Window")
|
|
|
|
"w" '(evil-window-map :which-key "Window")
|
|
|
|
@@ -532,10 +549,14 @@ Setup the evil package, with some opinionated keybindings:
|
|
|
|
"zC" #'hs-hide-level
|
|
|
|
"zC" #'hs-hide-level
|
|
|
|
"zO" #'hs-show-all
|
|
|
|
"zO" #'hs-show-all
|
|
|
|
"'" #'evil-goto-mark
|
|
|
|
"'" #'evil-goto-mark
|
|
|
|
"`" #'evil-goto-mark-line
|
|
|
|
"`" #'evil-goto-mark-line)
|
|
|
|
"C-w" #'evil-window-map
|
|
|
|
|
|
|
|
|
|
|
|
(general-def
|
|
|
|
|
|
|
|
:keymaps 'override
|
|
|
|
|
|
|
|
:states '(normal motion visual)
|
|
|
|
"gu" #'evil-upcase
|
|
|
|
"gu" #'evil-upcase
|
|
|
|
"gU" #'evil-downcase
|
|
|
|
"gU" #'evil-downcase
|
|
|
|
|
|
|
|
"M-y" #'yank-pop
|
|
|
|
"T" nil)
|
|
|
|
"T" nil)
|
|
|
|
|
|
|
|
|
|
|
|
(nmmap
|
|
|
|
(nmmap
|
|
|
|
@@ -735,11 +756,9 @@ looking for a command.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package amx
|
|
|
|
(use-package amx
|
|
|
|
:straight t
|
|
|
|
:straight t
|
|
|
|
:defer t
|
|
|
|
:hook (after-init-hook . amx-mode)
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(setq amx-backend 'ivy)
|
|
|
|
(setq amx-backend 'ivy))
|
|
|
|
:config
|
|
|
|
|
|
|
|
(amx-mode))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
*** Orderless
|
|
|
|
*** Orderless
|
|
|
|
Orderless sorting method for completion, probably one of the best
|
|
|
|
Orderless sorting method for completion, probably one of the best
|
|
|
|
@@ -767,10 +786,7 @@ around.
|
|
|
|
"RET" #'choose-completion)
|
|
|
|
"RET" #'choose-completion)
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(with-eval-after-load "evil"
|
|
|
|
(with-eval-after-load "evil"
|
|
|
|
(setq evil-emacs-state-modes (cl-remove-if
|
|
|
|
(evil-set-initial-state 'completions-list-mode 'normal)))
|
|
|
|
#'(lambda (x) (eq 'completions-list-mode x))
|
|
|
|
|
|
|
|
evil-emacs-state-modes))
|
|
|
|
|
|
|
|
(add-to-list 'evil-normal-state-modes 'completions-list-mode)))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
*** Company
|
|
|
|
*** Company
|
|
|
|
Company is the auto complete system I use. I don't like having heavy
|
|
|
|
Company is the auto complete system I use. I don't like having heavy
|
|
|
|
@@ -1100,6 +1116,9 @@ really need this in my config at all times. Enable when needed.
|
|
|
|
:defer t)
|
|
|
|
:defer t)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
** Hl-line
|
|
|
|
** Hl-line
|
|
|
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
|
|
|
:header-args:emacs-lisp: :tangle no
|
|
|
|
|
|
|
|
:END:
|
|
|
|
Highlights the current line.
|
|
|
|
Highlights the current line.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package hl-line
|
|
|
|
(use-package hl-line
|
|
|
|
@@ -1335,26 +1354,13 @@ at last.
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(save-place-mode))
|
|
|
|
(save-place-mode))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
** Rot13
|
|
|
|
|
|
|
|
ROT13 encoding is a pretty simple cipher; fun to make decoders and
|
|
|
|
|
|
|
|
encoders for. Emacs has default support for it, to the point where it
|
|
|
|
|
|
|
|
can display files with the encoding without changing the underlying
|
|
|
|
|
|
|
|
text. That's what this is mainly for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
(use-package rot13
|
|
|
|
|
|
|
|
:defer t
|
|
|
|
|
|
|
|
:general
|
|
|
|
|
|
|
|
(mode-leader
|
|
|
|
|
|
|
|
"r" #'toggle-rot13-mode))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Licensing
|
|
|
|
** Licensing
|
|
|
|
Loads [[file:elisp/license.el][license.el]] for inserting licenses.
|
|
|
|
Loads [[file:elisp/license.el][license.el]] for inserting licenses.
|
|
|
|
Licenses are important for distribution and attribution to be defined
|
|
|
|
Licenses are important for distribution and attribution to be defined
|
|
|
|
clearly.
|
|
|
|
clearly.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package license
|
|
|
|
(use-package license
|
|
|
|
:defer t
|
|
|
|
:demand t
|
|
|
|
:load-path "elisp/"
|
|
|
|
:load-path "elisp/"
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(insert-leader
|
|
|
|
(insert-leader
|
|
|
|
@@ -1400,9 +1406,21 @@ directories particularly efficiently.
|
|
|
|
:load-path "elisp/"
|
|
|
|
:load-path "elisp/"
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(file-leader
|
|
|
|
(file-leader
|
|
|
|
"P" #'+search/find-file
|
|
|
|
"p" #'+search/find-file
|
|
|
|
"S" #'+search/search-all))
|
|
|
|
"S" #'+search/search-all))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Separedit
|
|
|
|
|
|
|
|
Edit anything anywhere all at once!
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
(use-package separedit
|
|
|
|
|
|
|
|
:defer t
|
|
|
|
|
|
|
|
:straight t
|
|
|
|
|
|
|
|
:general
|
|
|
|
|
|
|
|
(leader "e" #'separedit)
|
|
|
|
|
|
|
|
:init
|
|
|
|
|
|
|
|
(setq separedit-default-mode 'org-mode
|
|
|
|
|
|
|
|
separedit-remove-trailing-spaces-in-comment t))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
* Applications
|
|
|
|
* Applications
|
|
|
|
Emacs is basically an operating system whose primary datatype is text.
|
|
|
|
Emacs is basically an operating system whose primary datatype is text.
|
|
|
|
Applications are interfaces/environments which serve a variety of
|
|
|
|
Applications are interfaces/environments which serve a variety of
|
|
|
|
@@ -1554,7 +1572,8 @@ Here I setup dired with a few niceties
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(setq-default dired-listing-switches "-AFBlu --group-directories-first"
|
|
|
|
(setq-default dired-listing-switches "-AFBlu --group-directories-first"
|
|
|
|
dired-omit-files "^\\."
|
|
|
|
dired-omit-files "^\\."
|
|
|
|
dired-dwim-target t)
|
|
|
|
dired-dwim-target t
|
|
|
|
|
|
|
|
dired-kill-when-opening-new-dired-buffer t)
|
|
|
|
(with-eval-after-load "evil-collection"
|
|
|
|
(with-eval-after-load "evil-collection"
|
|
|
|
(evil-collection-dired-setup))
|
|
|
|
(evil-collection-dired-setup))
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
@@ -1649,16 +1668,15 @@ easier than even using the mark based system.
|
|
|
|
** Eshell
|
|
|
|
** Eshell
|
|
|
|
*** Why Eshell?
|
|
|
|
*** Why Eshell?
|
|
|
|
Eshell is an integrated shell environment for Emacs, written in Emacs
|
|
|
|
Eshell is an integrated shell environment for Emacs, written in Emacs
|
|
|
|
Lisp. I argue that it is the best shell/command interpreter to use in
|
|
|
|
Lisp. I argue henceforth that it is the best shell/command
|
|
|
|
Emacs.
|
|
|
|
interpreter to use in Emacs.
|
|
|
|
|
|
|
|
|
|
|
|
Eshell is unlike the alternatives in Emacs as it's a /shell/ first,
|
|
|
|
Eshell is unlike the other alternatives in Emacs as it's a /shell/
|
|
|
|
not a terminal emulator. It has the ability to spoof some aspects of a
|
|
|
|
first, not a terminal emulator, with the ability to spoof some aspects
|
|
|
|
terminal emulator (through the shell parser), but it is NOT a terminal
|
|
|
|
of a terminal emulator (through the shell parser).
|
|
|
|
emulator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The killer benefits of eshell (which would appeal to Emacs users) are
|
|
|
|
The killer benefits of eshell (which would appeal particularly to an
|
|
|
|
a direct result of eshell being written in Emacs lisp:
|
|
|
|
Emacs user) are a direct result of eshell being written in Emacs Lisp:
|
|
|
|
- incredible integration with Emacs utilities (such as ~dired~,
|
|
|
|
- incredible integration with Emacs utilities (such as ~dired~,
|
|
|
|
~find-file~, any read functions, etc)
|
|
|
|
~find-file~, any read functions, etc)
|
|
|
|
- very extensible, easy to write new commands which leverage Emacs
|
|
|
|
- very extensible, easy to write new commands which leverage Emacs
|
|
|
|
@@ -1700,11 +1718,8 @@ them.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package eshell
|
|
|
|
(use-package eshell
|
|
|
|
:defer t
|
|
|
|
:defer t
|
|
|
|
:general
|
|
|
|
|
|
|
|
(shell-leader
|
|
|
|
|
|
|
|
"t" #'eshell)
|
|
|
|
|
|
|
|
:display
|
|
|
|
:display
|
|
|
|
("\\*e?shell\\*"
|
|
|
|
("\\*.*eshell\\*"
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(window-height . 0.33))
|
|
|
|
(window-height . 0.33))
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
@@ -1715,12 +1730,14 @@ them.
|
|
|
|
'eshell-mode-hook
|
|
|
|
'eshell-mode-hook
|
|
|
|
(proc
|
|
|
|
(proc
|
|
|
|
(interactive)
|
|
|
|
(interactive)
|
|
|
|
|
|
|
|
(nmap
|
|
|
|
|
|
|
|
:keymaps 'eshell-mode-map
|
|
|
|
|
|
|
|
"0" #'eshell-bol)
|
|
|
|
(general-def
|
|
|
|
(general-def
|
|
|
|
:states '(normal insert)
|
|
|
|
:states '(normal insert)
|
|
|
|
:keymaps 'eshell-mode-map
|
|
|
|
:keymaps 'eshell-mode-map
|
|
|
|
"0" #'eshell-bol
|
|
|
|
"C-j" #'eshell-next-matching-input-from-input
|
|
|
|
"M-j" #'eshell-next-matching-input-from-input
|
|
|
|
"C-k" #'eshell-previous-matching-input-from-input)
|
|
|
|
"M-k" #'eshell-previous-matching-input-from-input)
|
|
|
|
|
|
|
|
(local-leader
|
|
|
|
(local-leader
|
|
|
|
:keymaps 'eshell-mode-map
|
|
|
|
:keymaps 'eshell-mode-map
|
|
|
|
"c" (proc (interactive) (eshell/clear)
|
|
|
|
"c" (proc (interactive) (eshell/clear)
|
|
|
|
@@ -1743,8 +1760,7 @@ internals, just standard old Emacs packages.
|
|
|
|
:load-path "elisp/"
|
|
|
|
:load-path "elisp/"
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(defun +eshell/banner-message ()
|
|
|
|
(defun +eshell/banner-message ()
|
|
|
|
(concat (shell-command-to-string "~/.local/scripts/cowfortune")
|
|
|
|
(concat (shell-command-to-string "cowfortune") "\n"))
|
|
|
|
"\n"))
|
|
|
|
|
|
|
|
(setq eshell-prompt-regexp (format "^%s" +eshell-prompt/user-prompt)
|
|
|
|
(setq eshell-prompt-regexp (format "^%s" +eshell-prompt/user-prompt)
|
|
|
|
eshell-prompt-function #'+eshell-prompt/make-prompt
|
|
|
|
eshell-prompt-function #'+eshell-prompt/make-prompt
|
|
|
|
eshell-banner-message '(+eshell/banner-message)))
|
|
|
|
eshell-banner-message '(+eshell/banner-message)))
|
|
|
|
@@ -1762,11 +1778,24 @@ if I loaded this ~:after~ eshell then the first instance has no
|
|
|
|
knowledge of the new additions.
|
|
|
|
knowledge of the new additions.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package eshell-additions
|
|
|
|
(use-package eshell-additions
|
|
|
|
|
|
|
|
:defer t
|
|
|
|
:load-path "elisp/"
|
|
|
|
:load-path "elisp/"
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
|
|
|
|
(shell-leader
|
|
|
|
|
|
|
|
"t" #'+eshell/open)
|
|
|
|
(leader
|
|
|
|
(leader
|
|
|
|
"T" #'+eshell/at-cwd))
|
|
|
|
"T" #'+eshell/at-cwd))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
*** Eshell syntax highlighting
|
|
|
|
|
|
|
|
This package external package adds syntax highlighting to eshell
|
|
|
|
|
|
|
|
(disabling it for remote work). Doesn't require a lot of config
|
|
|
|
|
|
|
|
thankfully.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
(use-package eshell-syntax-highlighting
|
|
|
|
|
|
|
|
:straight t
|
|
|
|
|
|
|
|
:after eshell
|
|
|
|
|
|
|
|
:hook (eshell-mode-hook . eshell-syntax-highlighting-mode))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
** WAIT Elfeed
|
|
|
|
** WAIT Elfeed
|
|
|
|
:PROPERTIES:
|
|
|
|
:PROPERTIES:
|
|
|
|
:header-args:emacs-lisp: :tangle no
|
|
|
|
:header-args:emacs-lisp: :tangle no
|
|
|
|
@@ -2122,7 +2151,7 @@ limit), so set it for specific modes need the help.
|
|
|
|
(text-mode-hook . whitespace-mode)
|
|
|
|
(text-mode-hook . whitespace-mode)
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(setq whitespace-style '(face empty spaces tabs newline trailing lines-char
|
|
|
|
(setq whitespace-style '(face empty spaces tabs newline trailing lines-char
|
|
|
|
tab-mark missing-newline-at-eof)
|
|
|
|
tab-mark)
|
|
|
|
whitespace-line-column 80))
|
|
|
|
whitespace-line-column 80))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
** Set auto-fill-mode for all text-modes
|
|
|
|
** Set auto-fill-mode for all text-modes
|
|
|
|
@@ -2233,7 +2262,7 @@ has very little overhead to work there.
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(window-height . 0.25))
|
|
|
|
(window-height . 0.25))
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(setq-default flycheck-check-syntax-automatically '(save new-line mode-enabled))
|
|
|
|
(setq-default flycheck-check-syntax-automatically '(save idle-change new-line mode-enabled))
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(with-eval-after-load "evil-collection"
|
|
|
|
(with-eval-after-load "evil-collection"
|
|
|
|
(evil-collection-flycheck-setup)))
|
|
|
|
(evil-collection-flycheck-setup)))
|
|
|
|
@@ -2454,8 +2483,21 @@ quickly generate them in C/C++ projects.
|
|
|
|
:straight t
|
|
|
|
:straight t
|
|
|
|
:defer t
|
|
|
|
:defer t
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(nmmap
|
|
|
|
(file-leader
|
|
|
|
"K" #'devdocs-lookup))
|
|
|
|
"d" #'devdocs-lookup))
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** rainbow-delimiters
|
|
|
|
|
|
|
|
Makes colours delimiters (parentheses) based on their depth in an
|
|
|
|
|
|
|
|
expression. Rainbow flag in your Lisp source code.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
(use-package rainbow-delimiters
|
|
|
|
|
|
|
|
:defer t
|
|
|
|
|
|
|
|
:straight t
|
|
|
|
|
|
|
|
:general
|
|
|
|
|
|
|
|
(mode-leader "r" #'rainbow-delimiters-mode)
|
|
|
|
|
|
|
|
:hook
|
|
|
|
|
|
|
|
(lisp-mode-hook . rainbow-delimiters-mode)
|
|
|
|
|
|
|
|
(emacs-lisp-mode-hook . rainbow-delimiters-mode))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
* Org mode
|
|
|
|
* Org mode
|
|
|
|
Org is, at its most basic, a markup language. =org-mode= is a major
|
|
|
|
Org is, at its most basic, a markup language. =org-mode= is a major
|
|
|
|
@@ -2681,7 +2723,7 @@ them. This allows me to search my configuration pretty quickly.
|
|
|
|
+org/search-config-headings)
|
|
|
|
+org/search-config-headings)
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(file-leader
|
|
|
|
(file-leader
|
|
|
|
"p" #'+org/search-config-headings)
|
|
|
|
"P" #'+org/search-config-headings)
|
|
|
|
(search-leader
|
|
|
|
(search-leader
|
|
|
|
:keymaps 'org-mode-map
|
|
|
|
:keymaps 'org-mode-map
|
|
|
|
"I" #'+org/search-headings)
|
|
|
|
"I" #'+org/search-headings)
|
|
|
|
@@ -2972,22 +3014,16 @@ OBJECTS=$(CODE:$(SRC)/%.c=$(DIST)/%.o)
|
|
|
|
DEPDIR:=$(DIST)/dependencies
|
|
|
|
DEPDIR:=$(DIST)/dependencies
|
|
|
|
DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d
|
|
|
|
DEPS:=$(CODE:$(SRC)/%.c=$(DEPDIR):%.d) $(DEPDIR)/main.d
|
|
|
|
|
|
|
|
|
|
|
|
TERM_YELLOW:=$(shell echo -e \"\\e[0;33m\")
|
|
|
|
|
|
|
|
TERM_GREEN:=$(shell echo -e \"\\e[0;32m\")
|
|
|
|
|
|
|
|
TERM_RESET:=$(shell echo -e \"\\e[0;0m\")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
.PHONY: all
|
|
|
|
all: $(OUT)
|
|
|
|
all: $(OUT)
|
|
|
|
|
|
|
|
|
|
|
|
$(OUT): $(DIST)/$(OUT)
|
|
|
|
$(OUT): $(DIST)/$(OUT)
|
|
|
|
|
|
|
|
|
|
|
|
$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST)
|
|
|
|
$(DIST)/$(OUT): $(OBJECTS) $(DIST)/main.o | $(DIST)
|
|
|
|
@$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
|
|
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
|
|
|
|
@echo \"$(TERM_GREEN)$@$(TERM_RESET): $^\"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR)
|
|
|
|
$(DIST)/%.o: $(SRC)/%.c | $(DIST) $(DEPDIR)
|
|
|
|
@$(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS)
|
|
|
|
$(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS)
|
|
|
|
@echo \"$(TERM_YELLOW)$@$(TERM_RESET): $<\"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
.PHONY: run
|
|
|
|
run: $(DIST)/$(OUT)
|
|
|
|
run: $(DIST)/$(OUT)
|
|
|
|
@@ -2995,13 +3031,13 @@ run: $(DIST)/$(OUT)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
.PHONY:
|
|
|
|
clean:
|
|
|
|
clean:
|
|
|
|
@rm -rfv $(DIST)/*
|
|
|
|
rm -rfv $(DIST)/*
|
|
|
|
|
|
|
|
|
|
|
|
$(DIST):
|
|
|
|
$(DIST):
|
|
|
|
@mkdir -p $(DIST)
|
|
|
|
mkdir -p $(DIST)
|
|
|
|
|
|
|
|
|
|
|
|
$(DEPDIR):
|
|
|
|
$(DEPDIR):
|
|
|
|
@mkdir -p $(DEPDIR)
|
|
|
|
mkdir -p $(DEPDIR)
|
|
|
|
|
|
|
|
|
|
|
|
-include $(DEPS)
|
|
|
|
-include $(DEPS)
|
|
|
|
"
|
|
|
|
"
|
|
|
|
@@ -3152,7 +3188,7 @@ my dotfiles).
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(code-leader
|
|
|
|
(code-leader
|
|
|
|
:keymaps '(c-mode-map c++-mode-map)
|
|
|
|
:keymaps '(c-mode-map c++-mode-map)
|
|
|
|
"f" #'+code/clang-format-region-or-buffer)
|
|
|
|
"f" #'clang-format-buffer)
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(define-minor-mode clang-format-mode
|
|
|
|
(define-minor-mode clang-format-mode
|
|
|
|
"On save formats the current buffer via clang-format."
|
|
|
|
"On save formats the current buffer via clang-format."
|
|
|
|
@@ -3492,29 +3528,24 @@ Here I just setup Sly to use ~sbcl~.
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(display-buffer-at-bottom)
|
|
|
|
(window-height . 0.25))
|
|
|
|
(window-height . 0.25))
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(evil-set-initial-state 'sly-db-mode 'emacs)
|
|
|
|
(evil-set-initial-state 'sly-db-mode 'normal)
|
|
|
|
(with-eval-after-load "org"
|
|
|
|
(with-eval-after-load "org"
|
|
|
|
(setq-default org-babel-lisp-eval-fn #'sly-eval))
|
|
|
|
(setq-default org-babel-lisp-eval-fn #'sly-eval))
|
|
|
|
(with-eval-after-load "company"
|
|
|
|
(with-eval-after-load "company"
|
|
|
|
(add-hook 'sly-mrepl-hook #'company-mode))
|
|
|
|
(add-hook 'sly-mrepl-hook #'company-mode))
|
|
|
|
:general
|
|
|
|
:general
|
|
|
|
(shell-leader
|
|
|
|
(shell-leader
|
|
|
|
"s" #'sly-mrepl)
|
|
|
|
"s" #'sly)
|
|
|
|
(nmap
|
|
|
|
(nmap
|
|
|
|
:keymaps 'lisp-mode-map
|
|
|
|
:keymaps 'lisp-mode-map
|
|
|
|
"gr" #'sly-eval-buffer
|
|
|
|
"gr" #'sly-eval-buffer
|
|
|
|
"gd" #'sly-edit-definition
|
|
|
|
"gd" #'sly-edit-definition
|
|
|
|
"gR" #'sly-who-calls)
|
|
|
|
"gR" #'sly-who-calls)
|
|
|
|
(local-leader
|
|
|
|
(local-leader
|
|
|
|
:keymaps '(sly-mrepl-mode-map lisp-mode-map)
|
|
|
|
:keymaps 'lisp-mode-map
|
|
|
|
"a" '(sly-apropos :which-key "Apropos")
|
|
|
|
"a" '(sly-apropos :which-key "Apropos")
|
|
|
|
"d" '(sly-describe-symbol :which-key "Describe symbol")
|
|
|
|
"d" '(sly-describe-symbol :which-key "Describe symbol")
|
|
|
|
"D" '(sly-documentation-lookup :which-key "Lookup on lispworks"))
|
|
|
|
"D" '(sly-documentation-lookup :which-key "Lookup on lispworks")
|
|
|
|
(local-leader
|
|
|
|
|
|
|
|
:keymaps 'sly-mrepl-mode-map
|
|
|
|
|
|
|
|
"s" '(sly-mrepl-shortcut :which-key "Shortcut"))
|
|
|
|
|
|
|
|
(local-leader
|
|
|
|
|
|
|
|
:keymaps 'lisp-mode-map
|
|
|
|
|
|
|
|
"l" '(sly-load-file :which-key "Load file")
|
|
|
|
"l" '(sly-load-file :which-key "Load file")
|
|
|
|
"c" '(sly-compile-defun :which-key "Compile defun")
|
|
|
|
"c" '(sly-compile-defun :which-key "Compile defun")
|
|
|
|
"C" '(sly-compile-file :which-key "Compile file")
|
|
|
|
"C" '(sly-compile-file :which-key "Compile file")
|
|
|
|
@@ -3526,10 +3557,68 @@ Here I just setup Sly to use ~sbcl~.
|
|
|
|
"e" #'sly-eval-last-expression
|
|
|
|
"e" #'sly-eval-last-expression
|
|
|
|
"f" #'sly-eval-defun
|
|
|
|
"f" #'sly-eval-defun
|
|
|
|
"r" #'sly-eval-region)
|
|
|
|
"r" #'sly-eval-region)
|
|
|
|
|
|
|
|
(nmap
|
|
|
|
|
|
|
|
:keymaps 'sly-mrepl-mode-map
|
|
|
|
|
|
|
|
"M-j" #'sly-mrepl-next-input-or-button
|
|
|
|
|
|
|
|
"M-k" #'sly-mrepl-previous-input-or-button)
|
|
|
|
|
|
|
|
(local-leader
|
|
|
|
|
|
|
|
:keymaps 'sly-mrepl-mode-map
|
|
|
|
|
|
|
|
"s" '(sly-mrepl-shortcut :which-key "Shortcut"))
|
|
|
|
|
|
|
|
(nmap
|
|
|
|
|
|
|
|
:keymaps 'sly-db-mode-map
|
|
|
|
|
|
|
|
"\C-i" 'sly-db-cycle
|
|
|
|
|
|
|
|
"g?" 'describe-mode
|
|
|
|
|
|
|
|
"S" 'sly-db-show-frame-source
|
|
|
|
|
|
|
|
"e" 'sly-db-eval-in-frame
|
|
|
|
|
|
|
|
"d" 'sly-db-pprint-eval-in-frame
|
|
|
|
|
|
|
|
"D" 'sly-db-disassemble
|
|
|
|
|
|
|
|
"i" 'sly-db-inspect-in-frame
|
|
|
|
|
|
|
|
"gj" 'sly-db-down
|
|
|
|
|
|
|
|
"gk" 'sly-db-up
|
|
|
|
|
|
|
|
(kbd "C-j") 'sly-db-down
|
|
|
|
|
|
|
|
(kbd "C-k") 'sly-db-up
|
|
|
|
|
|
|
|
"]]" 'sly-db-details-down
|
|
|
|
|
|
|
|
"[[" 'sly-db-details-up
|
|
|
|
|
|
|
|
(kbd "M-j") 'sly-db-details-down
|
|
|
|
|
|
|
|
(kbd "M-k") 'sly-db-details-up
|
|
|
|
|
|
|
|
"gg" 'sly-db-beginning-of-backtrace
|
|
|
|
|
|
|
|
"G" 'sly-db-end-of-backtrace
|
|
|
|
|
|
|
|
"t" 'sly-db-toggle-details
|
|
|
|
|
|
|
|
"gr" 'sly-db-restart-frame
|
|
|
|
|
|
|
|
"I" 'sly-db-invoke-restart-by-name
|
|
|
|
|
|
|
|
"R" 'sly-db-return-from-frame
|
|
|
|
|
|
|
|
"c" 'sly-db-continue
|
|
|
|
|
|
|
|
"s" 'sly-db-step
|
|
|
|
|
|
|
|
"n" 'sly-db-next
|
|
|
|
|
|
|
|
"o" 'sly-db-out
|
|
|
|
|
|
|
|
"b" 'sly-db-break-on-return
|
|
|
|
|
|
|
|
"a" 'sly-db-abort
|
|
|
|
|
|
|
|
"q" 'sly-db-quit
|
|
|
|
|
|
|
|
"A" 'sly-db-break-with-system-debugger
|
|
|
|
|
|
|
|
"B" 'sly-db-break-with-default-debugger
|
|
|
|
|
|
|
|
"P" 'sly-db-print-condition
|
|
|
|
|
|
|
|
"C" 'sly-db-inspect-condition
|
|
|
|
|
|
|
|
"g:" 'sly-interactive-eval
|
|
|
|
|
|
|
|
"0" 'sly-db-invoke-restart-0
|
|
|
|
|
|
|
|
"1" 'sly-db-invoke-restart-1
|
|
|
|
|
|
|
|
"2" 'sly-db-invoke-restart-2
|
|
|
|
|
|
|
|
"3" 'sly-db-invoke-restart-3
|
|
|
|
|
|
|
|
"4" 'sly-db-invoke-restart-4
|
|
|
|
|
|
|
|
"5" 'sly-db-invoke-restart-5
|
|
|
|
|
|
|
|
"6" 'sly-db-invoke-restart-6
|
|
|
|
|
|
|
|
"7" 'sly-db-invoke-restart-7
|
|
|
|
|
|
|
|
"8" 'sly-db-invoke-restart-8
|
|
|
|
|
|
|
|
"9" 'sly-db-invoke-restart-9)
|
|
|
|
(nmap
|
|
|
|
(nmap
|
|
|
|
:keymaps 'sly-inspector-mode-map
|
|
|
|
:keymaps 'sly-inspector-mode-map
|
|
|
|
"q" #'sly-inspector-quit))
|
|
|
|
"q" #'sly-inspector-quit))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
*** Sly-ASDF
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
(use-package sly-asdf
|
|
|
|
|
|
|
|
:straight t
|
|
|
|
|
|
|
|
:after sly)
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
*** Emacs lisp
|
|
|
|
*** Emacs lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package elisp-mode
|
|
|
|
(use-package elisp-mode
|
|
|
|
@@ -3545,10 +3634,10 @@ Here I just setup Sly to use ~sbcl~.
|
|
|
|
(">=" . "≥")
|
|
|
|
(">=" . "≥")
|
|
|
|
("defun" . "ƒ")
|
|
|
|
("defun" . "ƒ")
|
|
|
|
("loop" . "Σ")
|
|
|
|
("loop" . "Σ")
|
|
|
|
("some" . "∃")
|
|
|
|
|
|
|
|
("every" . "∀")
|
|
|
|
|
|
|
|
("mapcar" . "→")
|
|
|
|
("mapcar" . "→")
|
|
|
|
("loop" . "⇒"))
|
|
|
|
("reduce" . "↓")
|
|
|
|
|
|
|
|
("some" . "∃")
|
|
|
|
|
|
|
|
("every" . "∀"))
|
|
|
|
(emacs-lisp-mode-hook
|
|
|
|
(emacs-lisp-mode-hook
|
|
|
|
("lambda" . "λ")
|
|
|
|
("lambda" . "λ")
|
|
|
|
("t" . "⊨")
|
|
|
|
("t" . "⊨")
|
|
|
|
|