Compare commits
No commits in common. "6a57cbfd1f319404033ddd75311de56da4b35901" and "ff740ce08eb8949437da7ec73533556d26e2d46e" have entirely different histories.
6a57cbfd1f
...
ff740ce08e
3 changed files with 330 additions and 330 deletions
633
config.org
633
config.org
|
|
@ -3,61 +3,115 @@
|
||||||
#+CREATOR: Laurens Miers
|
#+CREATOR: Laurens Miers
|
||||||
#+LANGUAGE: en
|
#+LANGUAGE: en
|
||||||
|
|
||||||
|
* Elpaca
|
||||||
|
|
||||||
|
** Core
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defvar elpaca-installer-version 0.11)
|
||||||
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
|
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||||
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||||
|
:ref nil :depth 1 :inherit ignore
|
||||||
|
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||||
|
:build (:not elpaca--activate-package)))
|
||||||
|
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||||
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||||
|
(order (cdr elpaca-order))
|
||||||
|
(default-directory repo))
|
||||||
|
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||||
|
(unless (file-exists-p repo)
|
||||||
|
(make-directory repo t)
|
||||||
|
(when (<= emacs-major-version 28) (require 'subr-x))
|
||||||
|
(condition-case-unless-debug err
|
||||||
|
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||||
|
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||||
|
,@(when-let* ((depth (plist-get order :depth)))
|
||||||
|
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||||
|
,(plist-get order :repo) ,repo))))
|
||||||
|
((zerop (call-process "git" nil buffer t "checkout"
|
||||||
|
(or (plist-get order :ref) "--"))))
|
||||||
|
(emacs (concat invocation-directory invocation-name))
|
||||||
|
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||||
|
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||||
|
((require 'elpaca))
|
||||||
|
((elpaca-generate-autoloads "elpaca" repo)))
|
||||||
|
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||||
|
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||||
|
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||||
|
(unless (require 'elpaca-autoloads nil t)
|
||||||
|
(require 'elpaca)
|
||||||
|
(elpaca-generate-autoloads "elpaca" repo)
|
||||||
|
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
||||||
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
|
(elpaca `(,@elpaca-order))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Use-package integration
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Install use-package support
|
||||||
|
(elpaca elpaca-use-package
|
||||||
|
;; Enable use-package :ensure support for Elpaca.
|
||||||
|
(elpaca-use-package-mode)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; wait to get elpaca use-package integration
|
||||||
|
(elpaca-wait)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Built-in packages
|
||||||
|
** Eldoc
|
||||||
|
|
||||||
|
I got the following error message when loading eglot:
|
||||||
|
#+BEGIN_SRC
|
||||||
|
eglot failed eldoc installed version (1 13 0) lower than min required 1.14.0 00.239351
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
So install the eldoc package to be sure we have the latest version.
|
||||||
|
But after installing it, we get a new warning:
|
||||||
|
|
||||||
|
#+BEGIN_SRC
|
||||||
|
⛔ Warning (emacs): eldoc loaded before Elpaca activation
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
This seemed tricker than expected, but found a solution in the github issues of elpaca:
|
||||||
|
https://github.com/progfolio/elpaca/issues/236
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package eldoc
|
||||||
|
:preface
|
||||||
|
;; avoid loading of built-in eldoc, see https://github.com/progfolio/elpaca/issues/236#issuecomment-1879838229
|
||||||
|
(unload-feature 'eldoc t)
|
||||||
|
(setq custom-delayed-init-variables '())
|
||||||
|
(defvar global-eldoc-mode nil)
|
||||||
|
:demand t
|
||||||
|
:config
|
||||||
|
(global-eldoc-mode))
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Jsonrpc
|
||||||
|
After eldoc was taken care of, a new error was reported:
|
||||||
|
#+BEGIN_SRC
|
||||||
|
eglot failed jsonrpc installed version (1 0 16) lower than min required 1.0.24 00.280828
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
So let's install the latest one:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package jsonrpc)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Wait for loading updated packages
|
||||||
|
|
||||||
|
Wait until updated built-in packages are fully loaded:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(elpaca-wait)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* General config
|
* General config
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package emacs
|
|
||||||
:ensure nil
|
|
||||||
:custom
|
|
||||||
(inhibit-startup-message t)
|
|
||||||
:init
|
|
||||||
(with-current-buffer (get-buffer-create "*scratch*")
|
|
||||||
(insert (format ";;
|
|
||||||
;; ██╗ ██╗███████╗██╗ ██╗ ██████╗
|
|
||||||
;; ██║ ██║██╔════╝██║ ██║ ██╔═══██╗
|
|
||||||
;; ███████║█████╗ ██║ ██║ ██║ ██║
|
|
||||||
;; ██╔══██║██╔══╝ ██║ ██║ ██║ ██║
|
|
||||||
;; ██║ ██║███████╗███████╗███████╗╚██████╔╝
|
|
||||||
;; ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝
|
|
||||||
;;
|
|
||||||
;; ███████╗███╗ ███╗ █████╗ ██████╗███████╗
|
|
||||||
;; ██╔════╝████╗ ████║██╔══██╗██╔════╝██╔════╝
|
|
||||||
;; █████╗ ██╔████╔██║███████║██║ ███████╗
|
|
||||||
;; ██╔══╝ ██║╚██╔╝██║██╔══██║██║ ╚════██║
|
|
||||||
;; ███████╗██║ ╚═╝ ██║██║ ██║╚██████╗███████║
|
|
||||||
;; ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚══════╝
|
|
||||||
;;
|
|
||||||
;; Loading time : %s
|
|
||||||
;; Packages : %s
|
|
||||||
;;
|
|
||||||
"
|
|
||||||
(emacs-init-time)
|
|
||||||
(number-to-string (length package-activated-list)))))
|
|
||||||
|
|
||||||
(message (emacs-init-time))
|
|
||||||
)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Package repos
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(require 'package)
|
|
||||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
|
||||||
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
|
|
||||||
;; and `package-pinned-packages`. Most users will not need or want to do this.
|
|
||||||
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
|
||||||
(package-initialize)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Use-package
|
|
||||||
|
|
||||||
*** Always ensure
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(require 'use-package-ensure)
|
|
||||||
(setq use-package-always-ensure t)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Bell
|
** Bell
|
||||||
|
|
||||||
The audible bell is annoying AF.
|
The audible bell is annoying AF.
|
||||||
|
|
@ -72,15 +126,10 @@ The audible bell is annoying AF.
|
||||||
(setq column-number-mode 1)
|
(setq column-number-mode 1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Whitespace cleanup
|
** Delete trailing whitespaces
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package whitespace
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
:ensure nil
|
|
||||||
:hook (before-save-hook . whitespace-cleanup)
|
|
||||||
;; if we wanna remove this hook at any time, eval:
|
|
||||||
;; (remove-hook 'before-save-hook #'whitespace-cleanup)
|
|
||||||
)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Save history and recent files
|
** Save history and recent files
|
||||||
|
|
@ -157,60 +206,16 @@ Use list-buffers bigger brother.
|
||||||
(global-set-key (kbd "M-SPC") 'mark-word)
|
(global-set-key (kbd "M-SPC") 'mark-word)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Eldoc
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package eldoc
|
|
||||||
:ensure nil
|
|
||||||
:init
|
|
||||||
(global-eldoc-mode))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Isearch
|
** Isearch
|
||||||
|
|
||||||
Inspired by [[https://github.com/LionyxML/emacs-solo][emacs-solo]]:
|
Display number of matches:
|
||||||
|
#+begin_src emacs-lisp
|
||||||
#+BEGIN_SRC emacs-lisp
|
(setq-default isearch-lazy-count t)
|
||||||
(use-package isearch
|
#+end_src
|
||||||
:ensure nil
|
|
||||||
:config
|
|
||||||
(setq isearch-lazy-count t) ; Display number of matches
|
|
||||||
(setq lazy-count-prefix-format "(%s/%s) ") ; eye-candy to add braces
|
|
||||||
(defun isearch-copy-selected-word ()
|
|
||||||
"Copy the current `isearch` selection to the kill ring."
|
|
||||||
(interactive)
|
|
||||||
(when isearch-other-end
|
|
||||||
(let ((selection (buffer-substring-no-properties isearch-other-end (point))))
|
|
||||||
(kill-new selection)
|
|
||||||
(isearch-exit))))
|
|
||||||
|
|
||||||
;; Bind `M-w` in isearch to copy the selected word, so M-s M-. M-w
|
|
||||||
;; does a great job of 'copying the current word under cursor'.
|
|
||||||
(define-key isearch-mode-map (kbd "M-w") 'isearch-copy-selected-word))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Reference that might be interesting for later:
|
Reference that might be interesting for later:
|
||||||
https://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html
|
https://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html
|
||||||
|
|
||||||
** Flymake
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package flymake
|
|
||||||
:ensure nil
|
|
||||||
:defer t
|
|
||||||
:hook
|
|
||||||
(prog-mode-hook . flymake-mode)
|
|
||||||
:custom
|
|
||||||
(flymake-show-diagnostics-at-end-of-line 'short)
|
|
||||||
(flymake-indicator-type 'margins)
|
|
||||||
(flymake-margin-indicators-string
|
|
||||||
`((error "!" compilation-error)
|
|
||||||
(warning "?" compilation-warning)
|
|
||||||
(note "i" compilation-info))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Abbrev
|
** Abbrev
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -247,6 +252,15 @@ Narrow-region/page is a really handy feature, enable it:
|
||||||
(put 'narrow-to-region 'disabled nil)
|
(put 'narrow-to-region 'disabled nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Use-package
|
||||||
|
|
||||||
|
*** Always ensure
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(require 'use-package-ensure)
|
||||||
|
(setq use-package-always-ensure t)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Adaptive cursor width
|
** Adaptive cursor width
|
||||||
|
|
||||||
Make cursor the width of the character it is under f.e. full width of a tab.
|
Make cursor the width of the character it is under f.e. full width of a tab.
|
||||||
|
|
@ -306,8 +320,8 @@ C-c C-c to apply."
|
||||||
:global t
|
:global t
|
||||||
(if (<= (length (window-list)) 1)
|
(if (<= (length (window-list)) 1)
|
||||||
(progn (setq resize-frame nil)
|
(progn (setq resize-frame nil)
|
||||||
(message "Only root frame exists, abort."))
|
(message "Only root frame exists, abort."))
|
||||||
(message "Use arrow-keys or C-p/n/f/b to adjust frames.")))
|
(message "Use arrow-keys or i/j/k/l to adjust frames.")))
|
||||||
|
|
||||||
(defun resize-frame-done ()
|
(defun resize-frame-done ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -321,14 +335,15 @@ C-c C-c to apply."
|
||||||
** Minibuffer
|
** Minibuffer
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
;; Enable vertico
|
||||||
(use-package vertico
|
(use-package vertico
|
||||||
:custom
|
;; :custom
|
||||||
;; (vertico-scroll-margin 0) ;; Different scroll margin
|
;; (vertico-scroll-margin 0) ;; Different scroll margin
|
||||||
;; (vertico-count 20) ;; Show more candidates
|
;; (vertico-count 20) ;; Show more candidates
|
||||||
;; (vertico-resize t) ;; Grow and shrink the Vertico minibuffer
|
;; (vertico-resize t) ;; Grow and shrink the Vertico minibuffer
|
||||||
(vertico-cycle t) ;; Enable cycling for `vertico-next/previous'
|
;; (vertico-cycle t) ;; Enable cycling for `vertico-next/previous'
|
||||||
:hook (after-init . vertico-mode)
|
:init
|
||||||
)
|
(vertico-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Consult
|
** Consult
|
||||||
|
|
@ -337,58 +352,58 @@ C-c C-c to apply."
|
||||||
(use-package consult
|
(use-package consult
|
||||||
;; Replace bindings. Lazily loaded by `use-package'.
|
;; Replace bindings. Lazily loaded by `use-package'.
|
||||||
:bind (;; C-c bindings in `mode-specific-map'
|
:bind (;; C-c bindings in `mode-specific-map'
|
||||||
;; ("C-c M-x" . consult-mode-command)
|
;; ("C-c M-x" . consult-mode-command)
|
||||||
;; ("C-c h" . consult-history)
|
;; ("C-c h" . consult-history)
|
||||||
;; ("C-c k" . consult-kmacro)
|
;; ("C-c k" . consult-kmacro)
|
||||||
;; ("C-c m" . consult-man)
|
;; ("C-c m" . consult-man)
|
||||||
;; ("C-c i" . consult-info)
|
;; ("C-c i" . consult-info)
|
||||||
([remap Info-search] . consult-info)
|
([remap Info-search] . consult-info)
|
||||||
;; C-x bindings in `ctl-x-map'
|
;; C-x bindings in `ctl-x-map'
|
||||||
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
||||||
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
||||||
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
||||||
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
||||||
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
|
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
|
||||||
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
||||||
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
||||||
;; Custom M-# bindings for fast register access
|
;; Custom M-# bindings for fast register access
|
||||||
;; ("M-#" . consult-register-load)
|
;; ("M-#" . consult-register-load)
|
||||||
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
||||||
;; ("C-M-#" . consult-register)
|
;; ("C-M-#" . consult-register)
|
||||||
;; Other custom bindings
|
;; Other custom bindings
|
||||||
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
||||||
;; M-g bindings in `goto-map'
|
;; M-g bindings in `goto-map'
|
||||||
("M-g e" . consult-compile-error)
|
("M-g e" . consult-compile-error)
|
||||||
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
||||||
("M-g g" . consult-goto-line) ;; orig. goto-line
|
("M-g g" . consult-goto-line) ;; orig. goto-line
|
||||||
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
||||||
;; ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
;; ("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
||||||
;; ("M-g m" . consult-mark)
|
;; ("M-g m" . consult-mark)
|
||||||
;; ("M-g k" . consult-global-mark)
|
;; ("M-g k" . consult-global-mark)
|
||||||
("M-i" . consult-imenu)
|
("M-i" . consult-imenu)
|
||||||
("M-I" . consult-imenu-multi)
|
("M-I" . consult-imenu-multi)
|
||||||
;; M-s bindings in `search-map'
|
;; M-s bindings in `search-map'
|
||||||
("M-s d" . consult-find) ;; Alternative: consult-fd
|
("M-s d" . consult-find) ;; Alternative: consult-fd
|
||||||
;; ("M-s c" . consult-locate)
|
;; ("M-s c" . consult-locate)
|
||||||
("M-s g" . consult-grep)
|
("M-s g" . consult-grep)
|
||||||
;; ("M-s G" . consult-git-grep)
|
;; ("M-s G" . consult-git-grep)
|
||||||
;; ("M-s r" . consult-ripgrep)
|
;; ("M-s r" . consult-ripgrep)
|
||||||
("M-s l" . consult-line)
|
("M-s l" . consult-line)
|
||||||
;; ("M-s L" . consult-line-multi)
|
;; ("M-s L" . consult-line-multi)
|
||||||
;; ("M-s k" . consult-keep-lines)
|
;; ("M-s k" . consult-keep-lines)
|
||||||
;; ("M-s u" . consult-focus-lines)
|
;; ("M-s u" . consult-focus-lines)
|
||||||
;; Isearch integration
|
;; Isearch integration
|
||||||
("M-s e" . consult-isearch-history)
|
("M-s e" . consult-isearch-history)
|
||||||
:map isearch-mode-map
|
:map isearch-mode-map
|
||||||
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||||
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||||
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
||||||
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
||||||
;; Minibuffer history
|
;; Minibuffer history
|
||||||
:map minibuffer-local-map
|
:map minibuffer-local-map
|
||||||
("M-s" . consult-history) ;; orig. next-matching-history-element
|
("M-s" . consult-history) ;; orig. next-matching-history-element
|
||||||
("M-r" . consult-history) ;; orig. previous-matching-history-element
|
("M-r" . consult-history) ;; orig. previous-matching-history-element
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Enable automatic preview at point in the *Completions* buffer. This is
|
;; Enable automatic preview at point in the *Completions* buffer. This is
|
||||||
;; relevant when you use the default completion UI.
|
;; relevant when you use the default completion UI.
|
||||||
|
|
@ -401,7 +416,7 @@ C-c C-c to apply."
|
||||||
;; preview for `consult-register', `consult-register-load',
|
;; preview for `consult-register', `consult-register-load',
|
||||||
;; `consult-register-store' and the Emacs built-ins.
|
;; `consult-register-store' and the Emacs built-ins.
|
||||||
;; (setq register-preview-delay 0.5
|
;; (setq register-preview-delay 0.5
|
||||||
;; register-preview-function #'consult-register-format)
|
;; register-preview-function #'consult-register-format)
|
||||||
|
|
||||||
;; Optionally tweak the register preview window.
|
;; Optionally tweak the register preview window.
|
||||||
;; This adds thin lines, sorting and hides the mode line of the window.
|
;; This adds thin lines, sorting and hides the mode line of the window.
|
||||||
|
|
@ -409,7 +424,7 @@ C-c C-c to apply."
|
||||||
|
|
||||||
;; Use Consult to select xref locations with preview
|
;; Use Consult to select xref locations with preview
|
||||||
(setq xref-show-xrefs-function #'consult-xref
|
(setq xref-show-xrefs-function #'consult-xref
|
||||||
xref-show-definitions-function #'consult-xref)
|
xref-show-definitions-function #'consult-xref)
|
||||||
|
|
||||||
;; Configure other variables and modes in the :config section,
|
;; Configure other variables and modes in the :config section,
|
||||||
;; after lazily loading the package.
|
;; after lazily loading the package.
|
||||||
|
|
@ -448,15 +463,15 @@ C-c C-c to apply."
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq completion-in-region-function
|
(setq completion-in-region-function
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(apply (if vertico-mode
|
(apply (if vertico-mode
|
||||||
#'consult-completion-in-region
|
#'consult-completion-in-region
|
||||||
#'completion--in-region)
|
#'completion--in-region)
|
||||||
args)))
|
args)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Corfu
|
*** Corfu
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC
|
||||||
(use-package corfu
|
(use-package corfu
|
||||||
;; Optional customizations
|
;; Optional customizations
|
||||||
:bind (:map corfu-map ("<tab>" . corfu-complete))
|
:bind (:map corfu-map ("<tab>" . corfu-complete))
|
||||||
|
|
@ -485,9 +500,22 @@ C-c C-c to apply."
|
||||||
(global-corfu-mode))
|
(global-corfu-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Orderless
|
*** Company-mode
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package company
|
||||||
|
:config
|
||||||
|
(define-key prog-mode-map
|
||||||
|
(kbd "TAB")
|
||||||
|
#'company-indent-or-complete-common)
|
||||||
|
:init
|
||||||
|
(global-company-mode)
|
||||||
|
)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Orderless
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:demand t
|
:demand t
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -507,18 +535,18 @@ C-c C-c to apply."
|
||||||
;; )
|
;; )
|
||||||
;; )
|
;; )
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
** Marginalia
|
** Marginalia
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Enable rich annotations using the Marginalia package
|
;; Enable rich annotations using the Marginalia package
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
||||||
;; available in the *Completions* buffer, add it to the
|
;; available in the *Completions* buffer, add it to the
|
||||||
;; `completion-list-mode-map'.
|
;; `completion-list-mode-map'.
|
||||||
:bind (:map minibuffer-local-map
|
:bind (:map minibuffer-local-map
|
||||||
("M-A" . marginalia-cycle))
|
("M-A" . marginalia-cycle))
|
||||||
|
|
||||||
;; The :init section is always executed.
|
;; The :init section is always executed.
|
||||||
:init
|
:init
|
||||||
|
|
@ -526,7 +554,7 @@ C-c C-c to apply."
|
||||||
;; the mode gets enabled right away. Note that this forces loading the
|
;; the mode gets enabled right away. Note that this forces loading the
|
||||||
;; package.
|
;; package.
|
||||||
(marginalia-mode))
|
(marginalia-mode))
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
* Dired
|
* Dired
|
||||||
|
|
||||||
|
|
@ -540,10 +568,10 @@ C-c C-c to apply."
|
||||||
)
|
)
|
||||||
|
|
||||||
(add-hook 'dired-mode-hook
|
(add-hook 'dired-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; Set dired-x buffer-local variables here. For example:
|
;; Set dired-x buffer-local variables here. For example:
|
||||||
;; (dired-omit-mode 1)
|
;; (dired-omit-mode 1)
|
||||||
))
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Guess target directory
|
** Guess target directory
|
||||||
|
|
@ -564,8 +592,9 @@ Operate on the current line if no region is active.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package whole-line-or-region
|
(use-package whole-line-or-region
|
||||||
:config
|
|
||||||
(whole-line-or-region-global-mode 1)
|
:config
|
||||||
|
(whole-line-or-region-global-mode 1)
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -616,7 +645,8 @@ For the keybindings, we have to defien them in both raw and line mode. From the
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package monokai-theme
|
(use-package monokai-theme
|
||||||
:config
|
|
||||||
|
:init
|
||||||
(load-theme 'monokai t)
|
(load-theme 'monokai t)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -626,25 +656,29 @@ For the keybindings, we have to defien them in both raw and line mode. From the
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dashboard
|
(use-package dashboard
|
||||||
:config
|
:config
|
||||||
|
(add-hook 'elpaca-after-init-hook #'dashboard-insert-startupify-lists)
|
||||||
|
(add-hook 'elpaca-after-init-hook #'dashboard-initialize)
|
||||||
(dashboard-setup-startup-hook))
|
(dashboard-setup-startup-hook))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Hydra
|
* Hydra
|
||||||
|
|
||||||
https://github.com/abo-abo/hydra
|
Install and wait for hydra to be available since we are using it in this init.el :
|
||||||
|
#+begin_src emacs-lisp
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package hydra
|
(use-package hydra
|
||||||
:config
|
:ensure (:wait t)
|
||||||
;; Zoom hydra
|
|
||||||
(defhydra hydra-zoom (global-map "<f1>")
|
|
||||||
"zoom"
|
|
||||||
("g" text-scale-increase "in")
|
|
||||||
("l" text-scale-decrease "out")
|
|
||||||
)
|
|
||||||
|
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+end_src
|
||||||
|
|
||||||
|
** Text zoom
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defhydra hydra-zoom (global-map "<f1>")
|
||||||
|
"zoom"
|
||||||
|
("g" text-scale-increase "in")
|
||||||
|
("l" text-scale-decrease "out")
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Zygospore
|
* Zygospore
|
||||||
|
|
||||||
|
|
@ -685,63 +719,39 @@ https://github.com/victorhge/iedit
|
||||||
)
|
)
|
||||||
|
|
||||||
(mapc (lambda (mode)
|
(mapc (lambda (mode)
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
mode
|
mode
|
||||||
'(
|
'(
|
||||||
("\\<\\(FIXME\\)" 1 'highlight-angry-faces t)
|
("\\<\\(FIXME\\)" 1 'highlight-angry-faces t)
|
||||||
("\\<\\(TODO\\)" 1 'highlight-angry-faces t)
|
("\\<\\(TODO\\)" 1 'highlight-angry-faces t)
|
||||||
)))
|
)))
|
||||||
'(text-mode emacs-lisp-mode rust-mode zig-mode c-ts-mode c-mode prog-mode)
|
'(text-mode emacs-lisp-mode rust-mode zig-mode c-ts-mode c-mode prog-mode)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Electric pair
|
** Electric pair
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package elec-pair
|
(add-hook 'prog-mode-hook 'electric-pair-mode)
|
||||||
:ensure nil
|
|
||||||
:defer t
|
|
||||||
:hook (prog-mode-hook . electric-pair-mode))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Paren
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package paren
|
|
||||||
:ensure nil
|
|
||||||
:hook (after-init-hook . show-paren-mode)
|
|
||||||
:custom
|
|
||||||
(show-paren-delay 0)
|
|
||||||
(show-paren-style 'mixed)
|
|
||||||
(show-paren-context-when-offscreen t)) ;; show matches within window splits
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Eglot
|
** Eglot
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package eglot
|
(use-package eglot)
|
||||||
:ensure nil
|
|
||||||
:custom
|
|
||||||
(eglot-autoshutdown t)
|
|
||||||
:init
|
|
||||||
(setq eglot-stay-out-of '(xref))
|
(setq eglot-stay-out-of '(xref))
|
||||||
(add-hook 'prog-mode-hook 'eglot-ensure)
|
(add-hook 'prog-mode-hook 'eglot-ensure)
|
||||||
(add-hook 'eglot-managed-mode-hook (lambda ()
|
(add-hook 'eglot-managed-mode-hook (lambda ()
|
||||||
(if (eglot-managed-p)
|
(if (eglot-managed-p)
|
||||||
(add-hook 'xref-backend-functions 'eglot-xref-backend)
|
(add-hook 'xref-backend-functions 'eglot-xref-backend)
|
||||||
(remove-hook 'xref-backend-functions 'eglot-xref-backend)
|
(remove-hook 'xref-backend-functions 'eglot-xref-backend)
|
||||||
)))
|
)))
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Markdown-mode
|
** Markdown-mode
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode)
|
||||||
:defer t
|
|
||||||
)
|
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
@ -760,22 +770,48 @@ https://github.com/victorhge/iedit
|
||||||
|
|
||||||
** Magit
|
** Magit
|
||||||
|
|
||||||
|
*** Transient
|
||||||
|
|
||||||
|
Magit depends on this and it seems it's not installed as a dependency, so install it explicitly.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package transient
|
||||||
|
:ensure (:wait t)
|
||||||
|
)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Core
|
*** Core
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:defer t
|
:ensure (:wait t)
|
||||||
)
|
)
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
**** Extra commands
|
||||||
|
|
||||||
|
***** Update all submodules
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(transient-define-suffix magit-submodule-update-all ()
|
||||||
|
"Update all submodules"
|
||||||
|
:description "Update All git submodule update --init --recursive"
|
||||||
|
(interactive)
|
||||||
|
(magit-with-toplevel
|
||||||
|
(magit-run-git-async "submodule" "update" "--force")))
|
||||||
|
|
||||||
|
(transient-append-suffix 'magit-submodule "f"
|
||||||
|
'("U" magit-submodule-update-all))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Dumb-jump
|
** Dumb-jump
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package dumb-jump
|
(use-package dumb-jump
|
||||||
:init
|
:init
|
||||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** C-programming
|
** C-programming
|
||||||
|
|
@ -805,7 +841,6 @@ Move to the end if the compilation finishes.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
:defer t
|
|
||||||
:init
|
:init
|
||||||
(setq rust-mode-treesitter-derive t))
|
(setq rust-mode-treesitter-derive t))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -813,17 +848,13 @@ Move to the end if the compilation finishes.
|
||||||
** Zig
|
** Zig
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package zig-mode
|
(use-package zig-mode)
|
||||||
:defer t
|
|
||||||
)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Python
|
** Python
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package python-mode
|
(use-package python-mode)
|
||||||
:defer t
|
|
||||||
)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Multiple cursors
|
* Multiple cursors
|
||||||
|
|
@ -860,8 +891,8 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package comment-dwim-2
|
(use-package comment-dwim-2
|
||||||
:bind
|
:config
|
||||||
("M-;" . comment-dwim-2)
|
(global-set-key (kbd "M-;") 'comment-dwim-2)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
@ -877,27 +908,26 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
(add-hook 'project-find-functions #'project-projectile)
|
(add-hook 'project-find-functions #'project-projectile)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Org
|
* Org
|
||||||
|
|
||||||
** General config
|
** General config
|
||||||
|
*** Super/Sub-scripts
|
||||||
|
|
||||||
|
Use ={}= for subscripting:
|
||||||
|
|
||||||
|
https://orgmode.org/manual/Subscripts-and-superscripts.html
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org
|
(setq org-use-sub-superscripts '{})
|
||||||
:ensure nil
|
#+END_SRC
|
||||||
:defer t
|
|
||||||
:mode ("\\.org\\'" . org-mode)
|
*** Indentation
|
||||||
:config
|
|
||||||
(setq
|
Preserve indentation in SRC blocks
|
||||||
;; Start collapsed for speed
|
|
||||||
org-startup-folded t
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; Use ={}= for subscripting: https://orgmode.org/manual/Subscripts-and-superscripts.html
|
(setq org-src-preserve-indentation t)
|
||||||
org-use-sub-superscripts '{}
|
|
||||||
;; Preserve indentation in SRC blocks
|
|
||||||
org-src-preserve-indentation t
|
|
||||||
)
|
|
||||||
;; Ellipsis styling
|
|
||||||
(setq org-ellipsis " ▼ ")
|
|
||||||
(set-face-attribute 'org-ellipsis nil :inherit 'default :box nil))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Org-todo
|
** Org-todo
|
||||||
|
|
@ -917,8 +947,6 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
:defer t
|
|
||||||
:after org
|
|
||||||
:config
|
:config
|
||||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode))))
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -927,8 +955,6 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:defer t
|
|
||||||
:after org
|
|
||||||
:custom
|
:custom
|
||||||
(org-roam-directory "~/projects/notes")
|
(org-roam-directory "~/projects/notes")
|
||||||
(org-roam-completion-everywhere t)
|
(org-roam-completion-everywhere t)
|
||||||
|
|
@ -942,6 +968,27 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** UI
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package org-roam-ui
|
||||||
|
:ensure
|
||||||
|
(:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
|
||||||
|
:after org-roam
|
||||||
|
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
|
||||||
|
;; a hookable mode anymore, you're advised to pick something yourself
|
||||||
|
;; if you don't care about startup time, use
|
||||||
|
;; :hook (after-init . org-roam-ui-mode)
|
||||||
|
:config
|
||||||
|
(setq org-roam-ui-sync-theme t
|
||||||
|
org-roam-ui-follow t
|
||||||
|
org-roam-ui-update-on-save t
|
||||||
|
org-roam-ui-open-on-start t)
|
||||||
|
;; Start UI
|
||||||
|
;; (org-roam-ui-mode)
|
||||||
|
)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Consult
|
*** Consult
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
@ -982,8 +1029,6 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-download
|
(use-package org-download
|
||||||
:defer t
|
|
||||||
:after org
|
|
||||||
:config
|
:config
|
||||||
(add-hook 'dired-mode-hook 'org-download-enable)
|
(add-hook 'dired-mode-hook 'org-download-enable)
|
||||||
)
|
)
|
||||||
|
|
@ -1002,36 +1047,6 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
|
|
||||||
* Custom
|
* Custom
|
||||||
|
|
||||||
** Modeline
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq-default mode-line-format
|
|
||||||
'("%e" " "
|
|
||||||
;; (:propertize " " display (raise +0.1)) ;; Top padding
|
|
||||||
;; (:propertize " " display (raise -0.1)) ;; Bottom padding
|
|
||||||
(:propertize "𝝮 " face font-lock-keyword-face)
|
|
||||||
|
|
||||||
(:propertize
|
|
||||||
("" mode-line-mule-info mode-line-client mode-line-modified mode-line-remote mode-line-window-dedicated))
|
|
||||||
|
|
||||||
mode-line-frame-identification
|
|
||||||
mode-line-buffer-identification
|
|
||||||
" "
|
|
||||||
mode-line-position
|
|
||||||
mode-line-format-right-align
|
|
||||||
" "
|
|
||||||
(project-mode-line project-mode-line-format)
|
|
||||||
" "
|
|
||||||
(vc-mode vc-mode)
|
|
||||||
" "
|
|
||||||
mode-line-modes
|
|
||||||
mode-line-misc-info
|
|
||||||
mode-line-end-spaces)
|
|
||||||
project-mode-line t
|
|
||||||
mode-line-buffer-identification '(" %b")
|
|
||||||
mode-line-position-column-line-format '(" %l:%c"))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Org-roam
|
** Org-roam
|
||||||
|
|
||||||
Inspired by https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#filter-by-a-tag .
|
Inspired by https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#filter-by-a-tag .
|
||||||
|
|
@ -1041,11 +1056,11 @@ Inspired by https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#fi
|
||||||
"Select a single tag from list and filter `org-roam-node' by it."
|
"Select a single tag from list and filter `org-roam-node' by it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((tag (car (completing-read-multiple "Tag: "
|
(let ((tag (car (completing-read-multiple "Tag: "
|
||||||
(org-roam-tag-completions)))))
|
(org-roam-tag-completions)))))
|
||||||
(org-roam-node-find nil nil
|
(org-roam-node-find nil nil
|
||||||
(lambda (node)
|
(lambda (node)
|
||||||
(member tag
|
(member tag
|
||||||
(org-roam-node-tags node))))))
|
(org-roam-node-tags node))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Font
|
** Font
|
||||||
|
|
@ -1096,7 +1111,7 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(when buffer-file-name
|
(when buffer-file-name
|
||||||
(find-alternate-file
|
(find-alternate-file
|
||||||
(concat "/sudo:root@localhost:"
|
(concat "/sudo:root@localhost:"
|
||||||
buffer-file-name)
|
buffer-file-name)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -1124,9 +1139,9 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(defun myrmi/run-ceedling-tests (&optional file-name)
|
(defun myrmi/run-ceedling-tests (&optional file-name)
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* (
|
(let* (
|
||||||
(file-path (or file-name buffer-file-name))
|
(file-path (or file-name buffer-file-name))
|
||||||
(root-path (or (locate-dominating-file file-path ceedling-project-file-name) ceedling-project-root))
|
(root-path (or (locate-dominating-file file-path ceedling-project-file-name) ceedling-project-root))
|
||||||
)
|
)
|
||||||
(compile
|
(compile
|
||||||
(concat "cd " root-path " && " ceedling-cmd)
|
(concat "cd " root-path " && " ceedling-cmd)
|
||||||
)
|
)
|
||||||
|
|
@ -1163,8 +1178,8 @@ in a local directory (on Linux this is ~/.local/share/fonts).
|
||||||
(let ((dir default-directory))
|
(let ((dir default-directory))
|
||||||
(dolist (buffer (buffer-list))
|
(dolist (buffer (buffer-list))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(when (equal default-directory dir)
|
(when (equal default-directory dir)
|
||||||
(myrmi/reload-dir-locals-for-current-buffer))))))
|
(myrmi/reload-dir-locals-for-current-buffer))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Visit/reload config
|
** Visit/reload config
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,9 @@
|
||||||
;;; early-init.el --- Early Init -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;; Early init configuration for Emacs Solo
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
|
|
||||||
;; Only care about errors in *Messages* buffer
|
|
||||||
(setq warning-minimum-level :error)
|
|
||||||
|
|
||||||
;; We control when packages are enabled
|
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
(provide 'early-init)
|
|
||||||
|
|
||||||
;;; early-init.el ends here
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; no-native-compile: t
|
||||||
|
;; no-update-autoloads: t
|
||||||
|
;; End:
|
||||||
|
|
||||||
|
|
|
||||||
6
init.el
6
init.el
|
|
@ -1,9 +1,3 @@
|
||||||
;;; init.el --- Init -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;;; Load init files
|
|
||||||
|
|
||||||
;;; Increase garbage collection threshold during init but leave it to the default value after
|
;;; Increase garbage collection threshold during init but leave it to the default value after
|
||||||
;;; There are a LOT of articles/sites/... discussing this:
|
;;; There are a LOT of articles/sites/... discussing this:
|
||||||
;;; https://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
|
;;; https://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue