small mod
This commit is contained in:
@@ -88,7 +88,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
(exec-path-from-shell-initialize)))
|
||||
|
||||
(setq custom-file (expand-file-name "~/.emacs.d/custom.el"))
|
||||
(add-hook 'elpaca-elpaca-after-init-hook (lambda () (load custom-file 'no-error 'no-message)))
|
||||
(add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'no-error 'no-message)))
|
||||
|
||||
;; Start server
|
||||
(use-package server
|
||||
@@ -100,7 +100,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
;; Save place
|
||||
(use-package saveplace
|
||||
:ensure nil
|
||||
:hook (elpaca-elpaca-after-init . save-place-mode))
|
||||
:hook (elpaca-after-init . save-place-mode))
|
||||
|
||||
(use-package display-line-numbers
|
||||
:ensure nil
|
||||
@@ -136,7 +136,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
|
||||
(use-package paren
|
||||
:ensure nil
|
||||
:hook (elpaca-elpaca-after-init . show-paren-mode))
|
||||
:hook (elpaca-after-init . show-paren-mode))
|
||||
|
||||
;; ;; Show trailing whitespace only in prog-mode and text-mode
|
||||
;; (add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace t)))
|
||||
@@ -160,7 +160,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
|
||||
(use-package savehist
|
||||
:ensure nil
|
||||
:hook (elpaca-elpaca-after-init . savehist-mode)
|
||||
:hook (elpaca-after-init . savehist-mode)
|
||||
:init (setq enable-recursive-minibuffers t ; Allow commands in minibuffers
|
||||
history-length 1000
|
||||
savehist-additional-variables '(mark-ring
|
||||
@@ -219,7 +219,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
|
||||
(use-package browse-kill-ring
|
||||
:bind ("C-c k" . browse-kill-ring)
|
||||
:hook (elpaca-elpaca-after-init . browse-kill-ring-default-keybindings)
|
||||
:hook (elpaca-after-init . browse-kill-ring-default-keybindings)
|
||||
:init (setq browse-kill-ring-separator "────────────────"
|
||||
browse-kill-ring-separator-face 'shadow))
|
||||
|
||||
@@ -227,7 +227,7 @@ If this is a daemon session, load them all immediately instead."
|
||||
:init
|
||||
(setq scroll-conservatively 3
|
||||
scroll-margin 0)
|
||||
:hook (elpaca-elpaca-after-init . ultra-scroll-mode))
|
||||
:hook (elpaca-after-init . ultra-scroll-mode))
|
||||
|
||||
(use-package helpful
|
||||
:bind (([remap describe-function] . helpful-callable)
|
||||
|
||||
@@ -163,7 +163,6 @@
|
||||
(setq xref-show-xrefs-function #'consult-xref
|
||||
xref-show-definitions-function #'consult-xref))
|
||||
|
||||
;; (use-package consult-projectile)
|
||||
(use-package consult-flycheck)
|
||||
|
||||
(use-package consult-dir
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
;;;;;;;;;;;; elpaca initialise ;;;;;;;;;;;;;;;;;;
|
||||
(defvar elpaca-installer-version 0.12)
|
||||
(defvar elpaca-directory (expand-file-name "elpa/" user-emacs-directory))
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-sources-directory (expand-file-name "sources/" 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)))
|
||||
(let* ((repo (expand-file-name "elpa/" elpaca-sources-directory))
|
||||
(build (expand-file-name "elpa/" elpaca-builds-directory))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-sources-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))
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
(add-to-list 'meow-mode-state-list '(magit-mode . insert))
|
||||
(add-to-list 'meow-mode-state-list '(eat-mode . insert))
|
||||
(add-to-list 'meow-mode-state-list '(eshell-mode . insert))
|
||||
(add-to-list 'meow-mode-state-list '(git-commit-elisp-text-mode . insert))
|
||||
|
||||
(setq meow-keypad-leader-dispatch "C-c"
|
||||
meow-use-clipboard t)
|
||||
|
||||
@@ -88,6 +88,27 @@
|
||||
(?c ("\\circ"))
|
||||
))
|
||||
(setq cdlatex-math-modify-alist '((?f "\\mathbb" nil t nil nil)))
|
||||
(dolist (cmd '(("smat" "Insert smallmatrix env"
|
||||
"\\left( \\begin{smallmatrix} ? \\end{smallmatrix} \\right)"
|
||||
lazytab-position-cursor-and-edit
|
||||
nil nil t)
|
||||
("bmat" "Insert bmatrix env"
|
||||
"\\begin{bmatrix} ? \\end{bmatrix}"
|
||||
lazytab-position-cursor-and-edit
|
||||
nil nil t)
|
||||
("pmat" "Insert pmatrix env"
|
||||
"\\begin{pmatrix} ? \\end{pmatrix}"
|
||||
lazytab-position-cursor-and-edit
|
||||
nil nil t)
|
||||
("ali" "Insert pmatrix env"
|
||||
"\\begin{aligned} ? \\end{aligned}"
|
||||
lazytab-position-cursor-and-edit
|
||||
nil nil t)
|
||||
("tbl" "Insert table"
|
||||
"\\begin{table}\n\\centering ? \\caption{}\n\\end{table}\n"
|
||||
lazytab-position-cursor-and-edit
|
||||
nil t nil)))
|
||||
(push cmd cdlatex-command-alist))
|
||||
(defun tjh/cdlatex-yas-expand ()
|
||||
"Resolve the conflict between cdlatex and yasnippet. When this
|
||||
function returns true, the default `cdlatex-tab` will not be
|
||||
@@ -102,6 +123,17 @@ expansion, then cdlatex expansion."
|
||||
nil))
|
||||
(add-hook 'cdlatex-tab-hook 'tjh/cdlatex-yas-expand))
|
||||
|
||||
(use-package lazytab
|
||||
:demand t
|
||||
:after cdlatex
|
||||
:ensure '(lazytab :type git :host github :repo "karthink/lazytab" :files ("*.el"))
|
||||
:bind (:map orgtbl-mode-map
|
||||
("<tab>" . lazytab-org-table-next-field-maybe)
|
||||
("TAB" . lazytab-org-table-next-field-maybe))
|
||||
:config
|
||||
(add-hook 'cdlatex-tab-hook #'lazytab-cdlatex-or-orgtbl-next-field 90)
|
||||
)
|
||||
|
||||
;; (use-package texpresso
|
||||
;; :defer nil
|
||||
;; :load-path "~/.emacs.d/lisp/packages/")
|
||||
|
||||
@@ -196,15 +196,11 @@
|
||||
(use-package hl-line
|
||||
:ensure nil
|
||||
:hook ((after-init . global-hl-line-mode)
|
||||
((dashboard-mode eshell-mode shell-mode term-mode vterm-mode) .
|
||||
((dashboard-mode eshell-mode shell-mode term-mode vterm-mode eat-mode) .
|
||||
(lambda () (setq-local global-hl-line-mode nil)))))
|
||||
|
||||
;; Pulse highlight on selection
|
||||
(use-package pulsar
|
||||
:custom-face
|
||||
(pulsar-generic ((t :inherit region :extend t)))
|
||||
:custom (pulsar-delay pulse-delay)
|
||||
:hook (emacs-startup . pulsar-global-mode))
|
||||
(use-package beacon
|
||||
:hook elpaca-after-init)
|
||||
|
||||
(use-package spacious-padding
|
||||
:diminish
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
;; Fast search tool `ripgrep'
|
||||
(use-package rg
|
||||
;; :hook (elpaca-after-init . rg-enable-default-bindings)
|
||||
:hook (elpaca-after-init . rg-enable-default-bindings)
|
||||
:bind (:map rg-global-map
|
||||
("c" . rg-dwim-current-dir)
|
||||
("f" . rg-dwim-current-file)
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
:ensure nil
|
||||
:bind ("C-x C-b" . ibuffer)
|
||||
:bind (:map ibuffer-mode-map
|
||||
("M-o" . nil))
|
||||
:hook (ibuffer-mode . hl-line-mode)
|
||||
("M-o" . nil))
|
||||
:config
|
||||
(add-to-list 'ibuffer-help-buffer-modes 'helpful-mode)
|
||||
(add-to-list 'ibuffer-help-buffer-modes 'Man-mode)
|
||||
|
||||
Reference in New Issue
Block a user