Emacs: Switch to straight for package management.
This commit is contained in:
parent
7fdc0b06ab
commit
b24cde35d3
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
;; Icon font (required by doom and others).
|
;; Icon font (required by doom and others).
|
||||||
(use-package all-the-icons
|
(use-package all-the-icons
|
||||||
:pin melpa ; We need > 3.2.0 for all-the-icons-ivy-rich (issue #4).
|
;; :pin melpa ; We need > 3.2.0 for all-the-icons-ivy-rich (issue #4).
|
||||||
:init (defun my/font-installed-p (font-name)
|
:init (defun my/font-installed-p (font-name)
|
||||||
"Check if font with FONT-NAME is available."
|
"Check if font with FONT-NAME is available."
|
||||||
(if (find-font (font-spec :name font-name))
|
(if (find-font (font-spec :name font-name))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; buffers.el --- Default settings for buffers. -*- lexical-binding: t; -*-
|
;;; buffers.el --- Default settings for buffers. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-10T14:01:00+0100>
|
;; Time-stamp: <2020-03-15T14:28:55+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * Setup scratch buffer.
|
;; * Setup scratch buffer.
|
||||||
|
@ -11,7 +11,6 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
|
||||||
:custom ((initial-scratch-message nil) ; Make scratch buffer empty,
|
:custom ((initial-scratch-message nil) ; Make scratch buffer empty,
|
||||||
(initial-major-mode 'gfm-mode)) ; and select mode.
|
(initial-major-mode 'gfm-mode)) ; and select mode.
|
||||||
:config (progn
|
:config (progn
|
||||||
|
@ -67,7 +66,7 @@
|
||||||
|
|
||||||
;; Dedicate windows to “purposes”.
|
;; Dedicate windows to “purposes”.
|
||||||
(use-package window-purpose
|
(use-package window-purpose
|
||||||
:pin melpa ; We need > 1.7 <https://github.com/bmag/emacs-purpose/issues/158>
|
;; :pin melpa ; We need > 1.7 <https://github.com/bmag/emacs-purpose/issues/158>
|
||||||
:defer nil
|
:defer nil
|
||||||
:config (progn
|
:config (progn
|
||||||
(purpose-mode)
|
(purpose-mode)
|
||||||
|
@ -98,7 +97,7 @@
|
||||||
|
|
||||||
;; Highlight which buffer is active by dimming the others.
|
;; Highlight which buffer is active by dimming the others.
|
||||||
(use-package dimmer
|
(use-package dimmer
|
||||||
:pin melpa ; We need > 0.4.2 for configure-magit.
|
;; :pin melpa ; We need > 0.4.2 for configure-magit.
|
||||||
:config (progn
|
:config (progn
|
||||||
(dimmer-configure-which-key)
|
(dimmer-configure-which-key)
|
||||||
(dimmer-configure-magit)
|
(dimmer-configure-magit)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*-
|
;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-13T11:17:28+0100>
|
;; Time-stamp: <2020-03-15T14:28:25+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * Banish customizations.
|
;; * Banish customizations.
|
||||||
|
@ -14,7 +14,6 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
|
||||||
:diminish abbrev-mode
|
:diminish abbrev-mode
|
||||||
:diminish auto-fill-function
|
:diminish auto-fill-function
|
||||||
;; Banish customizations to another file.
|
;; Banish customizations to another file.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; input.el --- Configure behaviour of input devices. -*- lexical-binding: t; -*-
|
;;; input.el --- Configure behaviour of input devices. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-10T13:42:34+0100>
|
;; Time-stamp: <2020-03-15T14:28:13+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * Setup mouse & keyboard behaviour.
|
;; * Setup mouse & keyboard behaviour.
|
||||||
|
@ -9,7 +9,6 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
|
||||||
:custom ((mouse-wheel-scroll-amount '(1 ((shift) . 1))) ; Scroll 1 line.
|
:custom ((mouse-wheel-scroll-amount '(1 ((shift) . 1))) ; Scroll 1 line.
|
||||||
;; Paste text where the cursor is, not where the mouse is.
|
;; Paste text where the cursor is, not where the mouse is.
|
||||||
(mouse-yank-at-point t)
|
(mouse-yank-at-point t)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; package-management.el --- Initialize package management. -*- lexical-binding: t; -*-
|
;;; package-management.el --- Initialize package management. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-11T16:10:53+0100>
|
;; Time-stamp: <2020-03-15T15:39:49+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * Set up package sources and their priorities.
|
;; * Set up package sources and their priorities.
|
||||||
|
@ -12,40 +12,50 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'package)
|
(setq straight-repository-branch "develop")
|
||||||
(add-to-list 'package-archives
|
(customize-set-variable
|
||||||
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
'straight-use-package-by-default t
|
||||||
(add-to-list 'package-archives
|
"Makes use-package invoke straight.el to install the package.")
|
||||||
'("melpa" . "https://melpa.org/packages/") t)
|
(customize-set-variable 'straight-cache-autoloads t
|
||||||
(setq package-archive-priorities '(("melpa-stable" . 30)
|
"Cache the autoloads of all packages in a single file.")
|
||||||
("gnu" . 20)
|
|
||||||
("melpa" . 10)))
|
(defvar bootstrap-version)
|
||||||
|
(let ((bootstrap-file
|
||||||
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||||
|
(bootstrap-version 5))
|
||||||
|
(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))
|
||||||
|
|
||||||
|
(add-hook 'after-init-hook #'straight-prune-build)
|
||||||
|
|
||||||
;; Workaround for 26.2 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341>.
|
;; Workaround for 26.2 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341>.
|
||||||
(when (< emacs-major-version 27)
|
(when (< emacs-major-version 27)
|
||||||
(defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
|
(defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
|
||||||
|
|
||||||
(when (< emacs-major-version 27)
|
;; Isolate package configurations.
|
||||||
(package-initialize))
|
(straight-use-package 'use-package)
|
||||||
|
|
||||||
;; Add path for custom packages.
|
(defun my/straight-pull-all-maybe ()
|
||||||
(add-to-list 'load-path (concat user-emacs-directory "custom-packages/"))
|
"Run `straight-pull-all' if 7 days have passed since the build cache was modified."
|
||||||
|
(let ((days 7))
|
||||||
|
(if (> (- (time-to-seconds)
|
||||||
|
(time-to-seconds
|
||||||
|
(file-attribute-modification-time
|
||||||
|
(file-attributes (expand-file-name "straight/build-cache.el"
|
||||||
|
user-emacs-directory)))))
|
||||||
|
(* 60 60 24 days))
|
||||||
|
(straight-pull-all))))
|
||||||
|
|
||||||
;; Install use-package if necessary.
|
;; ;; Autocompile files on load.
|
||||||
(unless (package-installed-p 'use-package)
|
;; (use-package auto-compile
|
||||||
(package-refresh-contents)
|
;; :custom (load-prefer-newer t) ; Use uncompiled file if it is newer.
|
||||||
(package-install 'use-package))
|
;; :config (auto-compile-on-load-mode))
|
||||||
(eval-when-compile
|
|
||||||
(require 'use-package))
|
|
||||||
|
|
||||||
;; Always install packages if they are not present.
|
|
||||||
(use-package use-package
|
|
||||||
:custom (use-package-always-ensure t))
|
|
||||||
|
|
||||||
;; Autocompile files on load.
|
|
||||||
(use-package auto-compile
|
|
||||||
:custom (load-prefer-newer t) ; Use uncompiled file if it is newer.
|
|
||||||
:config (auto-compile-on-load-mode))
|
|
||||||
|
|
||||||
;; Tool for updating the GNU ELPA keyring.
|
;; Tool for updating the GNU ELPA keyring.
|
||||||
(use-package gnu-elpa-keyring-update
|
(use-package gnu-elpa-keyring-update
|
||||||
|
@ -60,47 +70,5 @@
|
||||||
(if (> (- (time-to-seconds) my/keyring-last-access) (* 60 60 24 7))
|
(if (> (- (time-to-seconds) my/keyring-last-access) (* 60 60 24 7))
|
||||||
(gnu-elpa-keyring-update)))
|
(gnu-elpa-keyring-update)))
|
||||||
|
|
||||||
;; Update packages if at least 7 days have passed.
|
|
||||||
(use-package auto-package-update
|
|
||||||
:after (quelpa)
|
|
||||||
:demand t
|
|
||||||
:defines (quelpa-cache)
|
|
||||||
:custom ((auto-package-update-delete-old-versions t)
|
|
||||||
(auto-package-update-interval 7)
|
|
||||||
(auto-package-update-hide-results nil))
|
|
||||||
:config (progn
|
|
||||||
(auto-package-update-maybe)
|
|
||||||
(defvar my/tmp--package-activated-list nil)
|
|
||||||
(defun my/apu-delete-quelpa-packages ()
|
|
||||||
"Delete quelpa packages from `package-activated-list'."
|
|
||||||
(setq my/tmp--package-activated-list package-activated-list)
|
|
||||||
(dolist (package quelpa-cache)
|
|
||||||
(let ((package-name (car package)))
|
|
||||||
(setq package-activated-list
|
|
||||||
(delq package-name package-activated-list)))))
|
|
||||||
(defun my/apu-restore-quelpa-packages ()
|
|
||||||
"Restore quelpa packages to `package-activated-list'."
|
|
||||||
(if my/tmp--package-activated-list
|
|
||||||
(setq package-activated-list my/tmp--package-activated-list)
|
|
||||||
(message "Error: Could not restore `package-activated-list'."))
|
|
||||||
(setq my/tmp--package-activated-list nil)))
|
|
||||||
:hook ((auto-package-update-before . my/apu-delete-quelpa-packages)
|
|
||||||
(auto-package-update-after . my/apu-restore-quelpa-packages)))
|
|
||||||
|
|
||||||
;; Install Emacs packages directly from source.
|
|
||||||
(use-package quelpa
|
|
||||||
:demand t
|
|
||||||
:custom ((quelpa-self-upgrade-p nil)
|
|
||||||
(quelpa-update-melpa-p nil)
|
|
||||||
(quelpa-checkout-melpa-p nil)
|
|
||||||
(quelpa-upgrade-interval 7))
|
|
||||||
:hook (after-init . quelpa-upgrade-all-maybe))
|
|
||||||
|
|
||||||
;; Use :quelpa in use-package configurations.
|
|
||||||
(use-package quelpa-use-package
|
|
||||||
:after (use-package quelpa)
|
|
||||||
; Override `use-package-always-ensure' for quelpa-packages.
|
|
||||||
:config (quelpa-use-package-activate-advice))
|
|
||||||
|
|
||||||
(provide 'basics/package-management)
|
(provide 'basics/package-management)
|
||||||
;;; package-management.el ends here
|
;;; package-management.el ends here
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*-
|
;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-10T23:26:19+0100>
|
;; Time-stamp: <2020-03-15T15:21:36+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * treemacs
|
;; * treemacs
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
;; Directory tree.
|
;; Directory tree.
|
||||||
(use-package treemacs
|
(use-package treemacs
|
||||||
:pin melpa ; We need > 2.6 for lsp-treemacs.
|
;; :pin melpa ; We need > 2.6 for lsp-treemacs.
|
||||||
:demand t
|
:demand t
|
||||||
:after (display-line-numbers)
|
:after (display-line-numbers)
|
||||||
:custom ((treemacs-project-follow-cleanup t) ; Collapse projects when leaving.
|
:custom ((treemacs-project-follow-cleanup t) ; Collapse projects when leaving.
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
:after (treemacs projectile))
|
:after (treemacs projectile))
|
||||||
|
|
||||||
(use-package treemacs-magit
|
(use-package treemacs-magit
|
||||||
:after (treemacs magit)
|
;; :pin melpa ; See treemacs.
|
||||||
:pin melpa) ; Compatibility with treemacs-vcs.
|
:after (treemacs magit))
|
||||||
|
|
||||||
;; Completion in many Emacs commands.
|
;; Completion in many Emacs commands.
|
||||||
(use-package ivy
|
(use-package ivy
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; server.el --- Set up network stuff.. -*- lexical-binding: t; -*-
|
;;; server.el --- Set up network stuff.. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-02-27T06:05:32+0100>
|
;; Time-stamp: <2020-03-15T16:40:58+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
;; Edit remote files.
|
;; Edit remote files.
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package tramp
|
(use-package tramp
|
||||||
|
:straight nil
|
||||||
:defer 5
|
:defer 5
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
|
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-02-18T17:04:30+0100>
|
;; Time-stamp: <2020-03-15T14:29:24+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package flycheck-clang-tidy
|
(use-package flycheck-clang-tidy
|
||||||
:pin melpa
|
;; :pin melpa
|
||||||
:after (flycheck projectile lsp-ui)
|
:after (flycheck projectile lsp-ui)
|
||||||
:if (executable-find "clang-tidy")
|
:if (executable-find "clang-tidy")
|
||||||
;; clang-tidy is built into clangd >= 9.
|
;; clang-tidy is built into clangd >= 9.
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
;; Add #include directives for missing symbols.
|
;; Add #include directives for missing symbols.
|
||||||
(use-package clang-include-fixer
|
(use-package clang-include-fixer
|
||||||
:ensure nil ; Installed by clang.
|
:straight nil ; Installed by clang.
|
||||||
:if (executable-find "clang-include-fixer")
|
:if (executable-find "clang-include-fixer")
|
||||||
:functions (clang-include-fixer--start clang-include-fixer--add-header)
|
:functions (clang-include-fixer--start clang-include-fixer--add-header)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-10T12:56:35+0100>
|
;; Time-stamp: <2020-03-15T14:29:38+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
||||||
(require 'basics/global-variables)
|
(require 'basics/global-variables)
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
|
||||||
:defines (compilation-mode-map)
|
:defines (compilation-mode-map)
|
||||||
:custom (compilation-scroll-output 'first-error)
|
:custom (compilation-scroll-output 'first-error)
|
||||||
:config (progn
|
:config (progn
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
;; Checker for the metadata in Emacs Lisp files.
|
;; Checker for the metadata in Emacs Lisp files.
|
||||||
(use-package flycheck-package
|
(use-package flycheck-package
|
||||||
:after (flycheck)
|
:after (flycheck)
|
||||||
:pin melpa
|
;; :pin melpa
|
||||||
:config (flycheck-package-setup))
|
:config (flycheck-package-setup))
|
||||||
|
|
||||||
(provide 'programming/elisp)
|
(provide 'programming/elisp)
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
;; Git integration.
|
;; Git integration.
|
||||||
(use-package git-commit
|
(use-package git-commit
|
||||||
:defer 5
|
:defer 5
|
||||||
:pin melpa
|
;; :pin melpa
|
||||||
)
|
)
|
||||||
|
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:pin melpa
|
;; :pin melpa
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
(magit-diff-refine-hunk 'all) ; Show word-granularity differences.
|
(magit-diff-refine-hunk 'all) ; Show word-granularity differences.
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
;; Use libgit rather than git.
|
;; Use libgit rather than git.
|
||||||
(use-package magit-libgit
|
(use-package magit-libgit
|
||||||
:pin melpa
|
;; :pin melpa
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Show TODOs in magit-status.
|
;; Show TODOs in magit-status.
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
;; Work with Git forges from Magit.
|
;; Work with Git forges from Magit.
|
||||||
(use-package forge
|
(use-package forge
|
||||||
:pin melpa ; <https://github.com/magit/forge/issues/8>
|
;; :pin melpa ; <https://github.com/magit/forge/issues/8>
|
||||||
|
|
||||||
:after magit
|
:after magit
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
|
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-08T07:34:25+0100>
|
;; Time-stamp: <2020-03-15T23:37:37+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@
|
||||||
(require 'basics/global-variables)
|
(require 'basics/global-variables)
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
(require-final-newline t) ; Always add newline at end of file.
|
(require-final-newline t) ; Always add newline at end of file.
|
||||||
(fill-column 80) ; Documents are 80 chars wide by default.
|
(fill-column 80) ; Documents are 80 chars wide by default.
|
||||||
|
@ -21,7 +19,7 @@
|
||||||
("C-S-r" . point-to-register) ; Store location of point in register.
|
("C-S-r" . point-to-register) ; Store location of point in register.
|
||||||
("M-W" . copy-to-register) ; Store text in register.
|
("M-W" . copy-to-register) ; Store text in register.
|
||||||
("C-S-y" . insert-register) ; Insert text from register.
|
("C-S-y" . insert-register) ; Insert text from register.
|
||||||
("C-<f7>" . list-registers) ; List all registers.
|
("M-<f7>" . list-registers) ; List all registers.
|
||||||
|
|
||||||
:hook
|
:hook
|
||||||
(text-mode . auto-fill-mode) ; Enable word-wrapping at fill-column.
|
(text-mode . auto-fill-mode) ; Enable word-wrapping at fill-column.
|
||||||
|
@ -29,13 +27,16 @@
|
||||||
|
|
||||||
;; Quickly jump to next/previous register.
|
;; Quickly jump to next/previous register.
|
||||||
(use-package register-quicknav
|
(use-package register-quicknav
|
||||||
:quelpa (register-quicknav
|
:straight (register-quicknav
|
||||||
:fetcher git
|
:type git
|
||||||
:url "https://schlomp.space/tastytea/register-quicknav.git")
|
:repo "https://schlomp.space/tastytea/register-quicknav.git"
|
||||||
|
:branch "main")
|
||||||
|
;; ^^^^^^^ See <https://github.com/raxod502/straight.el/issues/279>.
|
||||||
:custom (register-quicknav-buffer-only t)
|
:custom (register-quicknav-buffer-only t)
|
||||||
:bind (("C-<f5>" . register-quicknav-prev-register)
|
:bind (("C-<f5>" . register-quicknav-prev-register)
|
||||||
("C-<f6>" . register-quicknav-next-register)
|
("C-<f6>" . register-quicknav-next-register)
|
||||||
("M-r" . register-quicknav-clear-current-register))
|
("C-<f7>" . register-quicknav-point-to-unused-register)
|
||||||
|
("C-S-<f7>" . register-quicknav-clear-current-register))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Save cursor position.
|
;; Save cursor position.
|
||||||
|
@ -175,7 +176,7 @@
|
||||||
:after (yasnippet)
|
:after (yasnippet)
|
||||||
|
|
||||||
:init
|
:init
|
||||||
(defun my/autoinsert-yas-expand()
|
(defun my/autoinsert-yas-expand ()
|
||||||
"Replace text in yasnippet template."
|
"Replace text in yasnippet template."
|
||||||
(yas-minor-mode t)
|
(yas-minor-mode t)
|
||||||
(yas-expand-snippet (buffer-string) (point-min) (point-max)))
|
(yas-expand-snippet (buffer-string) (point-min) (point-max)))
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
|
;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-02-18T17:18:01+0100>
|
;; Time-stamp: <2020-03-15T14:27:07+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-package tex-site
|
(use-package tex-site
|
||||||
:ensure auctex
|
:straight auctex
|
||||||
:if (executable-find "xetex")
|
:if (executable-find "xetex")
|
||||||
:functions (TeX-revert-document-buffer)
|
:functions (TeX-revert-document-buffer)
|
||||||
|
|
||||||
|
|
16
init.el
16
init.el
|
@ -1,6 +1,6 @@
|
||||||
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-03-13T11:23:01+0100>
|
;; Time-stamp: <2020-03-15T12:48:57+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Requires at least Emacs 26. Most of it will probably work with Emacs 24 and
|
;; Requires at least Emacs 26. Most of it will probably work with Emacs 24 and
|
||||||
|
@ -8,8 +8,13 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Set garbage collection threshold to 20 MiB to speed up init.
|
;; early-init.el is automatically loaded in Emacs 27+.
|
||||||
(setq gc-cons-threshold (* 20 1024 1024))
|
(when (< emacs-major-version 27)
|
||||||
|
(require 'early-init (expand-file-name "early-init.el" user-emacs-directory)))
|
||||||
|
|
||||||
|
(customize-set-variable
|
||||||
|
'gc-cons-threshold (* 20 1024 1024)
|
||||||
|
"Set garbage collection threshold to 20 MiB to speed up init.")
|
||||||
|
|
||||||
;; Add path to init files.
|
;; Add path to init files.
|
||||||
(push (concat user-emacs-directory "init.d") load-path)
|
(push (concat user-emacs-directory "init.d") load-path)
|
||||||
|
@ -38,8 +43,9 @@
|
||||||
(require 'net/server)
|
(require 'net/server)
|
||||||
(require 'net/client)
|
(require 'net/client)
|
||||||
|
|
||||||
;; Set garbage collection threshold to original value.
|
(customize-set-variable 'gc-cons-threshold
|
||||||
(setq gc-cons-threshold (car (get 'gc-cons-threshold 'standard-value)))
|
(car (get 'gc-cons-threshold 'standard-value))
|
||||||
|
"Set garbage collection threshold to original value.")
|
||||||
|
|
||||||
(provide 'init)
|
(provide 'init)
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
Loading…
Reference in New Issue
Block a user