Add straight
This commit is contained in:
parent
751afeab72
commit
d41a1c171b
2 changed files with 44 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -36,6 +36,9 @@ dist/
|
||||||
# Flycheck
|
# Flycheck
|
||||||
flycheck_*.el
|
flycheck_*.el
|
||||||
|
|
||||||
|
# Straight
|
||||||
|
straight/
|
||||||
|
|
||||||
# server auth directory
|
# server auth directory
|
||||||
/server/
|
/server/
|
||||||
|
|
||||||
|
@ -48,7 +51,6 @@ flycheck_*.el
|
||||||
# network security
|
# network security
|
||||||
/network-security.data
|
/network-security.data
|
||||||
|
|
||||||
|
|
||||||
# ---> Linux
|
# ---> Linux
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
|
41
init.el
Normal file
41
init.el
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;; Prolog
|
||||||
|
|
||||||
|
(let ((minver "26.1"))
|
||||||
|
(when (version< emacs-version minver)
|
||||||
|
(error "Emacs v%s or higher is required." minver)))
|
||||||
|
|
||||||
|
;; don't GC during startup to save time
|
||||||
|
(setq gc-cons-percentage 0.6)
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum)
|
||||||
|
|
||||||
|
;;; straight and use-package setup
|
||||||
|
|
||||||
|
(defconst straight-use-package-by-default 't)
|
||||||
|
(defconst bootstrap-version 5)
|
||||||
|
(let ((bootstrap-file
|
||||||
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)))
|
||||||
|
(unless (file-exists-p bootstrap-file)
|
||||||
|
(with-current-buffer
|
||||||
|
(url-retrieve-synchronously
|
||||||
|
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||||
|
'silent 'inhibit-cookies)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(eval-print-last-sexp)))
|
||||||
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Epilog
|
||||||
|
|
||||||
|
;; Set some more modern defaults for gc
|
||||||
|
;; https://www.reddit.com/r/emacs/comments/55ork0/is_emacs_251_noticeably_slower_than_245_on_windows/
|
||||||
|
;; https://github.com/emacs-lsp/lsp-mode#performance
|
||||||
|
(setq gc-cons-threshold (* 100 1024 1024))
|
||||||
|
(setq gc-cons-percentage 0.1) ; original value
|
||||||
|
;; (setq garbage-collection-messages t)) ; gc debugging
|
||||||
|
(run-with-idle-timer 5 nil #'garbage-collect)
|
||||||
|
|
||||||
|
;;; Local Variables:
|
||||||
|
;;; no-byte-compile: t
|
||||||
|
;;; End:
|
Loading…
Reference in a new issue