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)))
|
(exec-path-from-shell-initialize)))
|
||||||
|
|
||||||
(setq custom-file (expand-file-name "~/.emacs.d/custom.el"))
|
(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
|
;; Start server
|
||||||
(use-package server
|
(use-package server
|
||||||
@@ -100,7 +100,7 @@ If this is a daemon session, load them all immediately instead."
|
|||||||
;; Save place
|
;; Save place
|
||||||
(use-package saveplace
|
(use-package saveplace
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook (elpaca-elpaca-after-init . save-place-mode))
|
:hook (elpaca-after-init . save-place-mode))
|
||||||
|
|
||||||
(use-package display-line-numbers
|
(use-package display-line-numbers
|
||||||
:ensure nil
|
:ensure nil
|
||||||
@@ -136,7 +136,7 @@ If this is a daemon session, load them all immediately instead."
|
|||||||
|
|
||||||
(use-package paren
|
(use-package paren
|
||||||
:ensure nil
|
: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
|
;; ;; Show trailing whitespace only in prog-mode and text-mode
|
||||||
;; (add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace t)))
|
;; (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
|
(use-package savehist
|
||||||
:ensure nil
|
: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
|
:init (setq enable-recursive-minibuffers t ; Allow commands in minibuffers
|
||||||
history-length 1000
|
history-length 1000
|
||||||
savehist-additional-variables '(mark-ring
|
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
|
(use-package browse-kill-ring
|
||||||
:bind ("C-c k" . 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 "────────────────"
|
:init (setq browse-kill-ring-separator "────────────────"
|
||||||
browse-kill-ring-separator-face 'shadow))
|
browse-kill-ring-separator-face 'shadow))
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ If this is a daemon session, load them all immediately instead."
|
|||||||
:init
|
:init
|
||||||
(setq scroll-conservatively 3
|
(setq scroll-conservatively 3
|
||||||
scroll-margin 0)
|
scroll-margin 0)
|
||||||
:hook (elpaca-elpaca-after-init . ultra-scroll-mode))
|
:hook (elpaca-after-init . ultra-scroll-mode))
|
||||||
|
|
||||||
(use-package helpful
|
(use-package helpful
|
||||||
:bind (([remap describe-function] . helpful-callable)
|
:bind (([remap describe-function] . helpful-callable)
|
||||||
|
|||||||
@@ -163,7 +163,6 @@
|
|||||||
(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))
|
||||||
|
|
||||||
;; (use-package consult-projectile)
|
|
||||||
(use-package consult-flycheck)
|
(use-package consult-flycheck)
|
||||||
|
|
||||||
(use-package consult-dir
|
(use-package consult-dir
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
;;;;;;;;;;;; elpaca initialise ;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;; elpaca initialise ;;;;;;;;;;;;;;;;;;
|
||||||
(defvar elpaca-installer-version 0.12)
|
(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-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
(defvar elpaca-sources-directory (expand-file-name "sources/" elpaca-directory))
|
(defvar elpaca-sources-directory (expand-file-name "sources/" elpaca-directory))
|
||||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||||
:ref nil :depth 1 :inherit ignore
|
:ref nil :depth 1 :inherit ignore
|
||||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||||
:build (:not elpaca-activate)))
|
:build (:not elpaca-activate)))
|
||||||
(let* ((repo (expand-file-name "elpa/" elpaca-sources-directory))
|
(let* ((repo (expand-file-name "elpaca/" elpaca-sources-directory))
|
||||||
(build (expand-file-name "elpa/" elpaca-builds-directory))
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||||
(order (cdr elpaca-order))
|
(order (cdr elpaca-order))
|
||||||
(default-directory repo))
|
(default-directory repo))
|
||||||
(add-to-list 'load-path (if (file-exists-p build) build 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 '(magit-mode . insert))
|
||||||
(add-to-list 'meow-mode-state-list '(eat-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 '(eshell-mode . insert))
|
||||||
|
(add-to-list 'meow-mode-state-list '(git-commit-elisp-text-mode . insert))
|
||||||
|
|
||||||
(setq meow-keypad-leader-dispatch "C-c"
|
(setq meow-keypad-leader-dispatch "C-c"
|
||||||
meow-use-clipboard t)
|
meow-use-clipboard t)
|
||||||
|
|||||||
@@ -88,6 +88,27 @@
|
|||||||
(?c ("\\circ"))
|
(?c ("\\circ"))
|
||||||
))
|
))
|
||||||
(setq cdlatex-math-modify-alist '((?f "\\mathbb" nil t nil nil)))
|
(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 ()
|
(defun tjh/cdlatex-yas-expand ()
|
||||||
"Resolve the conflict between cdlatex and yasnippet. When this
|
"Resolve the conflict between cdlatex and yasnippet. When this
|
||||||
function returns true, the default `cdlatex-tab` will not be
|
function returns true, the default `cdlatex-tab` will not be
|
||||||
@@ -102,6 +123,17 @@ expansion, then cdlatex expansion."
|
|||||||
nil))
|
nil))
|
||||||
(add-hook 'cdlatex-tab-hook 'tjh/cdlatex-yas-expand))
|
(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
|
;; (use-package texpresso
|
||||||
;; :defer nil
|
;; :defer nil
|
||||||
;; :load-path "~/.emacs.d/lisp/packages/")
|
;; :load-path "~/.emacs.d/lisp/packages/")
|
||||||
|
|||||||
@@ -196,15 +196,11 @@
|
|||||||
(use-package hl-line
|
(use-package hl-line
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook ((after-init . global-hl-line-mode)
|
: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)))))
|
(lambda () (setq-local global-hl-line-mode nil)))))
|
||||||
|
|
||||||
;; Pulse highlight on selection
|
(use-package beacon
|
||||||
(use-package pulsar
|
:hook elpaca-after-init)
|
||||||
:custom-face
|
|
||||||
(pulsar-generic ((t :inherit region :extend t)))
|
|
||||||
:custom (pulsar-delay pulse-delay)
|
|
||||||
:hook (emacs-startup . pulsar-global-mode))
|
|
||||||
|
|
||||||
(use-package spacious-padding
|
(use-package spacious-padding
|
||||||
:diminish
|
:diminish
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
;; Fast search tool `ripgrep'
|
;; Fast search tool `ripgrep'
|
||||||
(use-package rg
|
(use-package rg
|
||||||
;; :hook (elpaca-after-init . rg-enable-default-bindings)
|
:hook (elpaca-after-init . rg-enable-default-bindings)
|
||||||
:bind (:map rg-global-map
|
:bind (:map rg-global-map
|
||||||
("c" . rg-dwim-current-dir)
|
("c" . rg-dwim-current-dir)
|
||||||
("f" . rg-dwim-current-file)
|
("f" . rg-dwim-current-file)
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
:bind ("C-x C-b" . ibuffer)
|
:bind ("C-x C-b" . ibuffer)
|
||||||
:bind (:map ibuffer-mode-map
|
:bind (:map ibuffer-mode-map
|
||||||
("M-o" . nil))
|
("M-o" . nil))
|
||||||
:hook (ibuffer-mode . hl-line-mode)
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'ibuffer-help-buffer-modes 'helpful-mode)
|
(add-to-list 'ibuffer-help-buffer-modes 'helpful-mode)
|
||||||
(add-to-list 'ibuffer-help-buffer-modes 'Man-mode)
|
(add-to-list 'ibuffer-help-buffer-modes 'Man-mode)
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
# key: frac
|
# key: frac
|
||||||
# group: math
|
# group: math
|
||||||
# name: \frac{numerator}{denominator}
|
# name: \frac{numerator}{denominator}
|
||||||
|
# condition: (and (texmathp) 'auto)
|
||||||
# --
|
# --
|
||||||
\frac{${1:numerator}}{${2:denominator}}$0
|
\frac{${1:numerator}}{${2:denominator}}$0
|
||||||
Reference in New Issue
Block a user