'Fresh' start
- Use config_new.org as main config file Trimmed down version of old config. Insipred by 'mastering emacs' book to use more the built-in functionality of emacs. I found that It's more than good enough for my usecases. - adapt early-init for quicker startup Stolen from doom emacs - Don't use/load project.org Use .dir-locals.el you peasant
This commit is contained in:
parent
27f8caf0a5
commit
0f9db243ad
4 changed files with 385 additions and 61 deletions
118
config.org
118
config.org
|
|
@ -117,11 +117,13 @@ This configuration requires the installation of :
|
|||
|
||||
** Garbage collection
|
||||
|
||||
Increase GC threshold to minimize time wasting:
|
||||
Increase GC threshold to minimize time wasting on modern machines:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq gc-cons-threshold 20000000) ;; 20 MB
|
||||
#+END_SRC
|
||||
|
||||
Recommendation stolen from https://github.com/lewang/flx?tab=readme-ov-file#gc-optimization .
|
||||
|
||||
* Base packages to install first
|
||||
** Elpaca
|
||||
|
||||
|
|
@ -130,76 +132,43 @@ Replacement for built-in package manager package.el :
|
|||
https://github.com/progfolio/elpaca
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar elpaca-installer-version 0.4)
|
||||
|
||||
(defvar elpaca-installer-version 0.7)
|
||||
(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
|
||||
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
|
||||
:build (:not elpaca--activate-package)))
|
||||
|
||||
:ref nil :depth 1
|
||||
: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))
|
||||
|
||||
(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 (call-process "git" nil buffer t "clone"
|
||||
|
||||
(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)))
|
||||
|
||||
(kill-buffer buffer)
|
||||
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
|
||||
(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)
|
||||
|
||||
(load "./elpaca-autoloads")))
|
||||
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
|
||||
(elpaca `(,@elpaca-order))
|
||||
#+END_SRC
|
||||
|
||||
|
|
@ -453,6 +422,14 @@ We could use an alias (alias sudo eshell/sudo $*), but to keep things inside thi
|
|||
(setq password-cache-expiry 3600) ; for one hour (time in secs)
|
||||
#+END_SRC
|
||||
|
||||
** Vterm
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package vterm
|
||||
:ensure t
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
* Dired
|
||||
|
||||
|
||||
|
|
@ -754,7 +731,7 @@ will the entire line including the following newline will be deleted.
|
|||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq kill-ring-max 5000) ; increase kill-ring capacity
|
||||
(setq kill-whole-line t)
|
||||
;; (setq kill-whole-line t)
|
||||
#+END_SRC
|
||||
|
||||
** Newline at end-of-file
|
||||
|
|
@ -1115,6 +1092,13 @@ TODO: need to document this
|
|||
|
||||
* Magit
|
||||
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package transient
|
||||
:ensure t
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package magit
|
||||
:ensure t
|
||||
|
|
@ -1171,6 +1155,26 @@ https://github.com/joaotavora/yasnippet
|
|||
|
||||
*** Eglot
|
||||
|
||||
Eldoc complaints:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eldoc
|
||||
:preface
|
||||
(unload-feature 'eldoc t)
|
||||
(setq custom-delayed-init-variables '())
|
||||
(defvar global-eldoc-mode nil)
|
||||
:config
|
||||
(global-eldoc-mode))
|
||||
|
||||
|
||||
(use-package jsonrpc
|
||||
:preface
|
||||
(unload-feature 'jsonrpc t)
|
||||
)
|
||||
|
||||
#+END_SRC
|
||||
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eglot
|
||||
:hook (prog-mode . eglot-ensure)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue