Add built-in functionality
This commit is contained in:
parent
44bb63ffe0
commit
9cea46891f
1
init.el
1
init.el
@ -22,6 +22,7 @@
|
|||||||
(require 'init-rime)
|
(require 'init-rime)
|
||||||
|
|
||||||
;; Edit
|
;; Edit
|
||||||
|
(require 'init-edit)
|
||||||
(require 'init-completion)
|
(require 'init-completion)
|
||||||
(require 'init-meow)
|
(require 'init-meow)
|
||||||
(require 'init-dired)
|
(require 'init-dired)
|
||||||
|
@ -1,15 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if command -v xelatex > /dev/null 2> /dev/null; then
|
# LaTeX
|
||||||
echo "TeX Live is already installed."
|
brew install texlive
|
||||||
else
|
|
||||||
echo "ERROR! TeX Live has not been installed. Make sure it's installed and environment variables are configured correctly."
|
|
||||||
echo "Depends on the TeX Live edition, append corresponding environments variables into ~/.zshrc"
|
|
||||||
echo 'export PATH="/usr/local/texlive/2023/bin/x86_64-linux:$PATH"'
|
|
||||||
echo 'export MANPATH="/usr/local/texlive/2023/texmf-dist/doc/man:$MANPATH"'
|
|
||||||
echo 'export INFOPATH="/usr/local/texlive/2023/texmf-dist/doc/info:$INFOPATH"'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# emacs
|
# emacs
|
||||||
brew tap d12frosted/emacs-plus
|
brew tap d12frosted/emacs-plus
|
||||||
@ -29,9 +21,10 @@ brew install node
|
|||||||
npm install -g yaml-language-server
|
npm install -g yaml-language-server
|
||||||
npm install -g bash-language-server
|
npm install -g bash-language-server
|
||||||
npm install -g vscode-langservers-extracted
|
npm install -g vscode-langservers-extracted
|
||||||
pip3 install ruff-lsp --break-system-packages
|
|
||||||
brew install texlab
|
brew install texlab
|
||||||
brew install basedpyright
|
brew install basedpyright
|
||||||
|
brew install ruff
|
||||||
|
brew install beancount-language-server
|
||||||
|
|
||||||
# aider
|
# aider
|
||||||
brew install aider
|
brew install aider
|
||||||
|
12
lisp/init-edit.el
Normal file
12
lisp/init-edit.el
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
;;; init-edit.el --- Edit settings -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; sudo-edit
|
||||||
|
(use-package sudo-edit)
|
||||||
|
|
||||||
|
(provide 'init-edit)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; init-edit.el ends here
|
@ -27,7 +27,7 @@
|
|||||||
when (font-installed-p font)
|
when (font-installed-p font)
|
||||||
return (set-face-attribute 'default nil
|
return (set-face-attribute 'default nil
|
||||||
:family font
|
:family font
|
||||||
:height (cond (sys/macp 130)
|
:height (cond (sys/macp 160)
|
||||||
(sys/win32p 110)
|
(sys/win32p 110)
|
||||||
(t 100))))
|
(t 100))))
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
(setq org-startup-numerated t)
|
(setq org-startup-numerated t)
|
||||||
; Hide emphasis markup characters in buffers @ https://orgmode.org/manual/Emphasis-and-Monospace.html
|
; Hide emphasis markup characters in buffers @ https://orgmode.org/manual/Emphasis-and-Monospace.html
|
||||||
(setq org-hide-emphasis-markers t)
|
(setq org-hide-emphasis-markers t)
|
||||||
|
; if there is a #+ATTR.*: width="200", resize to 200, otherwise resize to 320
|
||||||
|
(setq org-image-actual-width '(320))
|
||||||
|
(setq org-startup-with-inline-images t)
|
||||||
; https://orgmode.org/manual/Fast-access-to-TODO-states.html
|
; https://orgmode.org/manual/Fast-access-to-TODO-states.html
|
||||||
; https://orgmode.org/guide/Progress-Logging.html
|
; https://orgmode.org/guide/Progress-Logging.html
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
@ -91,9 +94,6 @@
|
|||||||
:config
|
:config
|
||||||
(setq-default org-download-heading-lvl nil)
|
(setq-default org-download-heading-lvl nil)
|
||||||
(setq-default org-download-image-dir "./img")
|
(setq-default org-download-image-dir "./img")
|
||||||
;;if there is a #+ATTR.*: width="200", resize to 200, otherwise resize to 320
|
|
||||||
(setq org-image-actual-width '(320))
|
|
||||||
(setq org-startup-with-inline-images t)
|
|
||||||
:hook
|
:hook
|
||||||
(org-mode . org-download-enable))
|
(org-mode . org-download-enable))
|
||||||
|
|
||||||
|
@ -5,19 +5,20 @@
|
|||||||
|
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:mode ("\\.pdf\\'" . pdf-view-mode) ; pdf 文件默认打开方式
|
:mode ("\\.pdf\\'" . pdf-view-mode) ; pdf 文件默认打开方式
|
||||||
:bind
|
;; :bind
|
||||||
(:map pdf-view-mode-map
|
;; (:map pdf-view-mode-map
|
||||||
("d" . pdf-view-next-page-command)
|
;; ("d" . pdf-view-next-page-command)
|
||||||
("a" . pdf-view-previous-page-command)
|
;; ("a" . pdf-view-previous-page-command)
|
||||||
("s" . pdf-view-scroll-up-or-next-page)
|
;; ("s" . pdf-view-scroll-up-or-next-page)
|
||||||
("w" . pdf-view-scroll-down-or-previous-page)
|
;; ("w" . pdf-view-scroll-down-or-previous-page)
|
||||||
:map pdf-history-minor-mode-map
|
;; :map pdf-history-minor-mode-map
|
||||||
("b" . pdf-history-backward)
|
;; ("b" . pdf-history-backward)
|
||||||
:map pdf-annot-minor-mode-map
|
;; :map pdf-annot-minor-mode-map
|
||||||
("C-a a" . pdf-annot-add-highlight-markup-annotation)
|
;; ("C-a a" . pdf-annot-add-highlight-markup-annotation)
|
||||||
("C-a s" . pdf-annot-add-squiggly-markup-annotation)
|
;; ("C-a s" . pdf-annot-add-squiggly-markup-annotation)
|
||||||
("C-a u" . pdf-annot-add-underline-markup-annotation)
|
;; ("C-a u" . pdf-annot-add-underline-markup-annotation)
|
||||||
("C-a d" . pdf-annot-delete))
|
;; ("C-a d" . pdf-annot-delete)
|
||||||
|
;; )
|
||||||
:custom
|
:custom
|
||||||
(pdf-view-midnight-colors '("#000000" . "#9bCD9b")) ; 夜间模式设置绿色底色
|
(pdf-view-midnight-colors '("#000000" . "#9bCD9b")) ; 夜间模式设置绿色底色
|
||||||
:config
|
:config
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; auto-revert
|
;; auto-revert
|
||||||
(global-auto-revert-mode 1)
|
(use-package autorevert
|
||||||
|
:ensure nil
|
||||||
|
:hook
|
||||||
|
(after-init . global-auto-revert-mode)
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Fluently Edit Large Files
|
;; Fluently Edit Large Files
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
rime-predicate-current-uppercase-letter-p
|
rime-predicate-current-uppercase-letter-p
|
||||||
; 在 LaTeX 数学环境中或者输入 LaTeX 命令时
|
; 在 LaTeX 数学环境中或者输入 LaTeX 命令时
|
||||||
rime-predicate-tex-math-or-command-p
|
rime-predicate-tex-math-or-command-p
|
||||||
|
; 在 org-mode 代码块中时
|
||||||
|
rime-predicate-org-in-src-block-p
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
; 强制中文模式, 无视 rime-disable-predicates 中的规则
|
; 强制中文模式, 无视 rime-disable-predicates 中的规则
|
||||||
|
@ -68,6 +68,12 @@
|
|||||||
(nerd-icons-font-family "Symbols Nerd Font Mono")
|
(nerd-icons-font-family "Symbols Nerd Font Mono")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; global-hl-line-mode
|
||||||
|
(use-package hl-line
|
||||||
|
:ensure nil
|
||||||
|
:hook (after-init . global-hl-line-mode))
|
||||||
|
|
||||||
(provide 'init-ui)
|
(provide 'init-ui)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; init-ui.el ends here
|
;;; init-ui.el ends here
|
||||||
|
@ -3,6 +3,15 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; winner-mode
|
||||||
|
(use-package winner-mode
|
||||||
|
:ensure nil
|
||||||
|
:hook
|
||||||
|
(after-init . winner-mode)
|
||||||
|
(ediff-quit . winner-undo)
|
||||||
|
)
|
||||||
|
|
||||||
(use-package shackle
|
(use-package shackle
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook (after-init . shackle-mode)
|
:hook (after-init . shackle-mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user