Emacs. Desire. Конфигурация
Конфигурация для пакета desire.
Содержание
1 Каталоги конфигурации
2 Установка переменных
3 Конфигурационные файлы
3.1 Заголовок
- В файле
rc.packages.el
находится список используемых пакетов. - Заголовок файла:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; origami-fold-style: triple-braces; -*-
2;;; rc.packages.el
3
4;;; Commentary:
5
6;;
7;; File id
8;;
9;; Copyright (C) 2002-2024 Dmitry S. Kulyabov
10;; Keywords: rc.packages
11;; Author: Dmitry S. Kulyabov <yamadharma@gmail.com>
12;; Maintainer: Dmitry S. Kulyabov <yamadharma@gmail.com>
13;;
14;; This code is free software in terms of GNU Gen. pub. Lic. v3 or later
15;;
16;; Description
17;;
18;;
19
20;;; Change Log:
- Файл:
1
2;;; Code:
3
4;; (desire-conf 'tiny)
5(desire-conf 'personal)
6;;
7;; Mule
8;;
9(desire-conf 'mule)
10;;(desire-conf 'mule-fontset)
11;; ----------------------------------------------------------------------
12;;
13;;{{{ Xemacs
14
15(if (string-match "XEmacs" emacs-version)
16 (desired 'xemacs))
17
18;;}}}
19;;; Package {{{
20
21;;; Packaging
22(desire 'package)
23
24;;; Build and install your Emacs Lisp packages on-the-fly and directly from source
25(desire 'quelpa)
26
27;;; A declarative package management system with a command line interface
28;; (desire 'straight)
29
30;;; Auto update packages
31(desire 'auto-package-update)
32
33;;;}}}
3.2 Компиляция файлов
3.2.1 compile-angel
- Подключим пакет:
- Настроим начальную конфигурацию:
- Настроим основные параметры:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Compile Emacs Lisp libraries automatically. 3;;; https://github.com/jamescherti/compile-angel.el 4 5;;; Ensure Emacs loads the most recent byte-compiled files. 6(setq load-prefer-newer t) 7 8;;; Ensure JIT compilation is enabled for improved performance by 9;;; native-compiling loaded .elc files asynchronously 10(setq native-comp-jit-compilation t) 11(setq native-comp-deferred-compilation t) ; Deprecated in Emacs > 29.1 12 13;;; Enable/Disable byte compilation and native compilation 14(setq compile-angel-enable-byte-compile t) 15(setq compile-angel-enable-native-compile t) 16 17;;; Enable verbose (Set it to t while debugging) 18(setq compile-angel-verbose nil) 19 20';; Display the *Compile-Log* buffer (Set it to t while writing elisp) 21(setq compile-angel-display-buffer nil) 22 23;;; Perform byte/native compilation of .el files only once during initial loading 24;;; (Setting this to nil will try to compile each time an .el file is loaded) 25(setq compile-angel-on-load-mode-compile-once t) 26 27;;; Ignore certain files, for example, for users of the `dir-config` package: 28(setq compile-angel-excluded-files-regexps '("/\\.dir-config\\.el$")) 29 30;;; Function that determines if an .el file should be compiled. It takes one 31;;; argument (an EL file) and returns t if the file should be compiled, 32;;; (By default, `compile-angel-predicate-function` is set to nil, which 33;;; means that the predicate function is not called.) 34(setq compile-angel-predicate-function 35 #'(lambda(el-file) 36 ;; Show a message 37 (message "PREDICATE: %s" el-file) 38 ;; Return t (Compile all) 39 t)) 40 41;; Ensure that quitting only occurs once Emacs finishes native compiling, 42;; preventing incomplete or leftover compilation files in `/tmp`. 43(setq native-comp-async-query-on-exit t) 44(setq confirm-kill-processes t) 45 46;;; Show buffer when there is a warning. 47;;; (NOT RECOMMENDED, except during development). 48;; (setq warning-minimum-level :warning) 49;; (setq byte-compile-verbose t) 50;; (setq byte-compile-warnings t) 51;; (setq native-comp-async-report-warnings-errors t) 52;; (setq native-comp-warning-on-missing-source t) 53 54;;; Non-nil means to natively compile packages as part of their installation. 55(setq package-native-compile t) 56 57(add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode) 58 59(compile-angel-on-save-mode) 60(compile-angel-on-load-mode) 61 62;;;
3.3 Системные настройки
1
2;; (desire 'esup)
3
4(desire-conf 'site-stuff)
5
6;;{{{ Window System
7
8(if (null window-system)
9 ()
10 (progn
11 (desire-conf 'window-system)
12 ; (desire-conf 'faces)
13 ; (desire-conf 'multi-frame)
14 )
15 )
16
17
18;; (if (null window-system)
19;; ()
20;; (desire-conf 'window-system)
21;; )
22
23;; (desire-conf 'window-system)
24;; (desire-conf 'test)
25
26;; (if (eq window-system 'w32)
27;; (progn
28;; (desired 'window-system)
29;; (desired 'window-system-w32)
30;; )
31;; )
32
33;; (if (and window-system
34;; (member window-system '(x gtk))
35;; (x-display-color-p)
36;; )
37;; (progn
38;; (desired 'window-system)
39;; (desire-conf 'faces)
40;; (desire-conf 'multi-frame)
41;; )
42;; )
43
44;;}}}
45;;{{{ Serve
46
47;;; Gnuserv
48;;(desire-conf 'gnuserv nil "gnuserv")
49;; Rely on dtemacs to do this, otherwise a race condition can cause
50;; dtemacs to fail.
51;; (gnuserv-start)
52
53;;; Emacs daemon
54;; (desire-conf 'emacs-daemon)
55
56;;; Emacs server
57(desire 'server)
58
59;;}}}
60
61(desire 'general)
62
63(desire 'exec-path-from-shell)
64(desire 'compat)
65
66(desire 'async)
67;; (desire 'gcmh)
68
69;; ----------------------------------------------------------------------
70
71;;{{{ Session Management
72
73(desire 'savehist)
74
75;;}}}
76
77(desire 'uniquify)
78
79(desire-conf 'keys)
80(desire-conf 'dialog)
81(desire-conf 'mouse)
82
83;; (desire 'xclip)
84
85(desire 'which-key)
86;; (desire 'keycast)
87
88;; ----------------------------------------------------------------------
89
90(desire 'pcache)
91(desire 'persistent-soft)
92
93(desire 'alert)
94
95(desire 'rg :precondition-system-executable "rg")
- В файле используется фолдинг по тройной скобке.
3.4 Оформление интерфейса
- Файл
rc.packages.el
:
1;;; UI {{{
3.4.1 Наборы иконок
1;;; Icons
all-the-icons
1;; (desire 'all-the-icons)
nerd-icons
- Загрузка пакета:
1(desire 'nerd-icons)
tab-line
- Emacs. Пакет tab-line
- Поддержка
nerd-icons
вtab-line
: - Пакет применяет иконки из
nerd-icons
к вкладкамtab-line
. - Минорный режим
tab-line-nerd-icons-global-mode
добавляет к функции по умолчаниюtab-line-tab-name-format-default
иконки для форматирования имён вкладок.
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Emacs package that uses the nerd-icons package to apply appropriate icons to tab-line tabs 3;;; https://github.com/lucius-martius/tab-line-nerd-icons 4 5(desire 'tab-line-nerd-icons) 6(require 'tab-line-nerd-icons) 7 8;;; Enable 9(tab-line-nerd-icons-global-mode) 10 11;;;
- Загрузка пакета:
3.4.2 Шрифты
1;; (desire 'mixed-pitch)
2
3(desire-conf 'fontset)
4(desire-conf 'font-lock)
5(desire-conf 'font-lock-jit)
6;; (desire-conf 'font-lock-lazy)
7;; (desire-conf 'font-lock-fast)
8;; (desire-conf 'faces)
9;; (desire-conf 'color-theme nil "color-theme")
10;; (desire-conf 'fira-code-mode nil "fira-code-mode" t) ;; Simple minor mode for Fira Code ligatures
11
12(desire 'unicode-fonts)
13
14;; (desire 'ligature)
15
16;; (desire-conf 'theme)
17
18;; (desire 'zoom)
3.4.3 Табы
1;;; Tabs
centaur-tabs
- Emacs. Пакет Centaur tabs
- Подключение:
1;; (desire 'centaur-tabs)
tab-bar
- Подключение:
1(desire 'tab-bar)
- Подключение:
tab-line
- Emacs. Пакет tab-line
- Подключение:
1(desire 'tab-line)
- Загрузка:
- Настройка:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Emacs Tab Line 3 4;;; Show the tabline in the top of the frame 5(global-tab-line-mode t) 6 7;;; Do not show add-new button 8;; (setq tab-line-new-button-show nil) 9 10;;; Do not show close button 11;; (setq tab-line-close-button-show nil) 12 13;;; Change the separator between tabs 14;; (setq tab-line-separator "") 15 16;;;
3.4.4 Нумерация строк
display-line-numbers
nlinum
3.4.5 Завершение
1;;;}}}
3.5 Автодополнение
- Файл
rc.packages.el
:
3.6 Автодополнение в минибуфере
3.6.1 Начало
- Файл
rc.packages.el
:1;;; Minibuffer completion {{{
3.6.2 Ido
- Файл
rc.packages.el
:1;; (desire 'ido)
3.6.3 Helm
- Файл
rc.packages.el
:
3.6.4 Ivy
- Файл
rc.packages.el
:1;; (desire 'ivy)
3.6.5 Selectrum
- Файл
rc.packages.el
:1;; (desire 'selectrum)
3.6.6 Vertico
- Файл
rc.packages.el
:1(desire 'vertico)
3.6.7 Конец
- Файл
rc.packages.el
:
3.7 Навигация по окнам
3.7.1 Начало
- Файл
rc.packages.el
:1;;; Window navigation {{{
3.7.2 Windmove
Файл
rc.packages.el
:1(desire 'windmove)
Настройка пакета:
По умолчанию используется комбинация
Shift
+ стрелки. Но это конфликтует с org-mode:Будем использовать
Ctrl
+ стрелки:Что-то делает:
Завершим файл:
1;;;
3.7.3 Конец
- Файл
rc.packages.el
:1;;;}}}
3.8 Общие настройки мод
3.9 Поддержка LSP
3.9.1 Начало
Файл
rc.packages.el
:1;;; LSP mode {{{
Включаем поддержку
emacs-lsp-booster
:1(desired 'emacs-lsp-booster :precondition-system-executable "emacs-lsp-booster")
3.9.2 Eglog
- Файл
rc.packages.el
:1(desire 'eglot)
- Начальная загрузка:
- Загрузка самого пакета:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; A client for Language Server Protocol servers 3;;; https://github.com/joaotavora/eglot 4 5(require 'eglot) 6 7;;; Control blocking of LSP connection attempts 8(setq eglot-sync-connect nil) 9 10(setq eglot-connect-timeout 10) 11(setq eglot-autoshutdown t) 12(setq eglot-send-changes-idle-time 0.5) 13 14;;; Disable `eglot-auto-display-help-buffer` because :select t in its popup rule causes eglot to steal focus too often. 15(setq eglot-auto-display-help-buffer nil) 16 17;;; Disable any debug logging and may speed things up 18(setq eglot-events-buffer-size 0) 19 20;;;
- Загрузка
emacs-lsp-booster
:1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Boost eglot using lsp-booster 3;;; https://github.com/jdtsmith/eglot-booster 4 5(desire 'eglot-booster :recipe '(:fetcher github :repo "jdtsmith/eglot-booster" :branch "main" :files ("*.el"))) 6(require 'eglot-booster) 7(eglot-booster-mode) 8 9;;;
3.9.3 Lsp-mode
- Файл
rc.packages.el
:1;; (desire 'lsp-mode)
3.9.4 Конец
- Файл
rc.packages.el
:
3.10 Casual Suite
3.10.1 Начало
- Файл
rc.packages.el
:
3.10.2 Основная библиотека
- Файл
packages/casual/loaddefs.ecf
: - Файл
packages/casual/desire.ecf
:1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes 3;;; https://github.com/kickingvegas/casual 4 5(require 'casual-calc) 6(require 'casual-dired) 7(require 'casual-isearch) 8(require 'casual-ibuffer) 9(require 'casual-info) 10(require 'casual-re-builder) 11(require 'casual-bookmarks) 12(require 'casual-editkit) 13 14(keymap-set calc-mode-map "C-o" #'casual-calc-tmenu) 15(keymap-set dired-mode-map "C-o" #'casual-dired-tmenu) 16(keymap-set isearch-mode-map "C-o" #'casual-isearch-tmenu) 17(keymap-set ibuffer-mode-map "C-o" #'casual-ibuffer-tmenu) 18(keymap-set ibuffer-mode-map "F" #'casual-ibuffer-filter-tmenu) 19(keymap-set ibuffer-mode-map "s" #'casual-ibuffer-sortby-tmenu) 20(keymap-set Info-mode-map "C-o" #'casual-info-tmenu) 21(keymap-set reb-mode-map "C-o" #'casual-re-builder-tmenu) 22(keymap-set reb-lisp-mode-map "C-o" #'casual-re-builder-tmenu) 23(keymap-set bookmark-bmenu-mode-map "C-o" #'casual-bookmarks-tmenu) 24(keymap-global-set "C-o" #'casual-editkit-main-tmenu) 25 26;;;
- Файл сделан под все элементы пакета.
- Необходимо будет разделить всё это по разным пакетам.
3.10.3 Поддержка Avy
- Файл
packages/casual/avy.ecf
:1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; An opinionated Transient menu for Avy. 3;;; https://github.com/kickingvegas/casual-avy 4 5(desire 'casual-avy) 6(require 'casual-avy) 7 8(keymap-global-set "M-g" #'casual-avy-tmenu) 9 10;;; Imenu (index) Support 11(add-hook 'markdown-mode-hook #'imenu-add-menubar-index) 12(add-hook 'makefile-mode-hook #'imenu-add-menubar-index) 13(add-hook 'prog-mode-hook #'imenu-add-menubar-index) 14(add-hook 'org-mode-hook #'imenu-add-menubar-index) 15 16;;;
3.10.4 Поддержка Symbol Overlay
- Файл
packages/casual/symbol-overlay.ecf
:1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; An opinionated Transient user interface for the Emacs package Symbol Overlay. 3;;; https://github.com/kickingvegas/casual-symbol-overlay 4 5(desire 'casual-symbol-overlay) 6(require 'casual-symbol-overlay) 7 8(keymap-set symbol-overlay-map "C-o" #'casual-symbol-overlay-tmenu) 9 10;;;
3.10.5 Поддержка Org-agenda
- Файл
packages/org/casual.ecf
:1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes 3;;; https://github.com/kickingvegas/casual 4 5(require 'casual-agenda) 6 7(keymap-set org-agenda-mode-map "C-o" #'casual-agenda-tmenu) 8(keymap-set org-agenda-mode-map "M-j" #'org-agenda-clock-goto) ; optional 9(keymap-set org-agenda-mode-map "J" #'bookmark-jump) ; optional 10 11;;;
3.11 Разное
- Файл
rc.packages.el
:
1;;
2
3(desire 'tree-sitter)
4
5(desire 'hydra)
6
7(desire 'bicycle)
8(desire 'hideshow)
9
10(desire-conf 'show-paren)
11;; (desire-conf 'folding)
12;; (desire-conf 'outline)
13
14
15(desire 'origami)
16
17;;
18
19(desire 'imenu)
20
21(desire 'ace-window)
22
23
24;; (desire-conf 'toolbar)
25
26;; Parentesis
27(desire 'smartparens)
28
29;;; Spell {{{
30
31;; (desire-conf 'spell)
32(desire 'ispell)
33(desire 'flyspell)
34;;(desire-conf 'speck)
35;;(desire-conf 'wcheck)
36
37;; (desire 'flycheck-languagetool)
38;; (desire 'langtool)
39
40;; (desire 'lsp-ltex :recipe '(:fetcher github :repo "emacs-languagetool/lsp-ltex" :branch "master" :files ("*.el")))
41;; (desire 'eglot-ltex :recipe '(:fetcher github :repo "emacs-languagetool/eglot-ltex" :branch "master" :files ("*.el")))
42
43;;;}}}
44;;; Adress book {{{
45
46(desired 'vcard)
47(desire 'khardel :precondition-system-executable "khard")
48(desire 'khalel :precondition-system-executable "khal")
49;; (desire 'org-vcard)
50;; (desire 'vdirel)
51;; (desire 'bbdb)
52
53;;;}}}
54;;; Bibliography {{{
55
56(desire 'biblio)
57(desire 'bibtex)
58
59;;;}}}
3.12 Проекты
3.12.1 Начало
1;;; Projects {{{
3.12.2 Project
1(desire 'project)
3.12.3 Projectile
1;; (desire 'projectile)
3.12.4 Завершение
1;;;}}}
3.13 Сниппеты
3.14 Отображение текста
1;;; Text {{{
2
3(desire 'texfrag)
4
5;; (desire 'adaptive-wrap)
6(desired 'visual-line-mode)
7
8;; (desired 'prettify-symbols-mode)
9;; (desire 'pretty-mode)
10;; (desire 'prettify-math)
11;; (desire 'math-preview)
3.15 Текстовые режимы
1(desire 'pandoc-mode)
2
3(desire' mermaid-mode :precondition-system-executable "mmdc")
4
5(desire-conf 'text)
6(desire-conf 'markdown-mode nil "markdown-mode" t)
7
8(desire 'plantuml-mode)
9
10(desire 'pdf-tools)
11(desire 'nov)
12(desire 'fb2-reader)
13
14;; (desire 'valign)
15
16;;;}}}
3.16 Управление временем
3.17 LaTeX
1;;; LaTeX {{{
2
3(desire 'xenops)
4;; (desire 'lsp-latex :precondition-system-executable "texlab")
5
6(desire 'cdlatex)
7
8(desire-conf 'xdvi nil "xdvi-search")
9(desired 'reftex)
10;; (desire-conf 'tex)
11(desired 'preview-latex)
12(desire 'auctex)
13;; (desire 'auctex :initname "latex")
14;; (desire 'auctex :initname "latex" :precondition-lisp-library "tex-site")
15
16;;;}}}
3.18 Org-mode
3.18.1 Babel
- Emacs. Org Babel
- Общие настройки babel:
- Отключим подтверждение запутывания:
org-auto-tangle
- Репозиторий: https://github.com/yilkalargaw/org-auto-tangle/
- Подключим org-auto-tangle:
1;;; A simple emacs package to allow org file tangling upon save 2;;; https://github.com/yilkalargaw/org-auto-tangle/ 3(desire 'org-auto-tangle) 4(require 'org-auto-tangle) 5(add-hook 'org-mode-hook 'org-auto-tangle-mode) 6 7;;; Auto-tangle as the default behavior for all org buffers 8;; (setq org-auto-tangle-default t)
Конец
1;;;
3.18.2 Разное
1;; (desire 'org-ql)
2
3(desire 'org-appear)
4(desire 'org-fragtog)
5(desire 'org-custom-cookies)
6;; (desire 'svg-tag-mode)
7(desire 'org-superstar)
8;; (desire 'org-modern-indent :recipe '(:fetcher github :repo "jdtsmith/org-modern-indent" :branch "main" :files ("*.el")))
9(desire 'org-modern)
10;; (desire 'org-contacts)
11;; (desire 'google-contacts)
12(desire 'org-edna)
13(desire 'org-ref)
14(desire 'org-tree-slide)
3.18.3 Повестка дня
- Конфигурация повестки дня:
1;;; Agenda
2(desire 'org-super-agenda)
3
4;;(if (desiredp 'org-ql)
5;; (desire 'org-agenda-files-track-ql)
6(desire 'org-agenda-files-track)
7;;)
8
9;;(if (desiredp 'org-ql)
10;; (desire 'org-agenda-files-track-ql :recipe '(:fetcher github :repo "nicolas-graves/org-agenda-files-track" :branch "master" :files ("org-agenda-files-track-ql.el")))
11;; (desire 'org-agenda-files-track :recipe '(:fetcher github :repo "nicolas-graves/org-agenda-files-track" :branch "master" :files ("org-agenda-files-track.el")))
12;;)
13
14;;; Literate
15(desire 'org-tanglesync)
16
17;; (desire 'org-gcal)
18(desire 'org-journal)
19
20(desire 'org-noter)
21;; (desire 'org-noter :recipe '(:fetcher github :repo "org-noter/org-noter" :branch "feature/org-roam-integration" :files ("*.el" "modules/*.el")))
22
23(desire 'org-transclusion)
3.18.4 org-gtd
- Emacs. Пакеты. Org-gtd
- Подключение для загрузки:
- Клавиатурные сочетания
3.18.5 mobileorg
1(desired 'mobileorg)
3.18.6 org-mode
Предпросмотр LaTeX
- Org-mode. Предпросмотр TeX
- Зададим каталог для создаваемых изображений (по умолчанию они создаются в рабочем каталоге):
- Зададим опции создания изображений:
- Зададим формат изображений. В данном случае это формат
svg
:1(setq org-latex-create-formula-image-program 'dvisvgm) 2(setq org-preview-latex-process-alist 3 '((dvipng :programs 4 ("lualatex" "dvipng") 5 :description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust 6 (1.0 . 1.0) 7 :latex-compiler 8 ("lualatex -output-format dvi -interaction nonstopmode -output-directory %o %f") 9 :image-converter 10 ("dvipng -D %D -T tight -o %O %f")) 11 (dvisvgm :programs 12 ("latex" "dvisvgm") 13 :description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust 14 (1.7 . 1.5) 15 :latex-compiler 16 ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f") 17 :image-converter 18 ("dvisvgm %f -n -b min -c %S -o %O")) 19 (imagemagick :programs 20 ("latex" "convert") 21 :description "pdf > png" :message "you need to install the programs: latex and imagemagick." :use-xcolor t :image-input-type "pdf" :image-output-type "png" :image-size-adjust 22 (1.0 . 1.0) 23 :latex-compiler 24 ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f") 25 :image-converter 26 ("convert -density %D -trim -antialias %f -quality 100 %O"))))
- Теперь зададим настройки для LaTeX:
- Опишем используемые пакеты:
1;;; Unicode fonts 2(add-to-list 'org-latex-packages-alist '("" "unicode-math") t) 3;;; Physics2 package 4;; (add-to-list 'org-latex-packages-alist '("" "physics2") t) 5;;; Math 6(add-to-list 'org-latex-packages-alist '("" "amsmath") t) 7(add-to-list 'org-latex-packages-alist '("" "mathtools") t) 8;;; Local definitions 9;; (add-to-list 'org-latex-packages-alist '("" "local-define") t) 10 11;;;
3.19 Заметочники
- Emacs. Персональная база знаний
- Разные заметочники:
1;;; Notes {{{
3.19.1 Org-roam
1;;; Org-roam {{{
2
3(desire 'emacsql)
4
5;; (desire 'delve :recipe '(:fetcher github :repo "publicimageltd/delve" :branch "main"))
6(desire 'zetteldesk)
7
8;; (desire 'org-roam-server)
9;; (desire 'org-roam-ui :recipe '(:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))
10;; (desire 'org-roam-ui :recipe '(:fetcher github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))
11(desire 'org-roam-ui)
12
13
14(desire 'magit-section)
15(desire 'org-roam)
16
17;;;}}}
3.19.2 Denote
3.20 Разное
1;; XML, XHTML, HTML {{{
2
3;;(desire-conf 'nxml nil "rng-auto")
4 ; (desire-conf 'psgml)
5
6;;;}}}
7;;;{{{ Palm pilot support
8
9 ;(desire-conf 'palm)
10
11;;;}}}
12;;; Desktop {{{
13
14;; (desire-conf 'desktop)
15(desire-conf 'session nil "session")
16(desire-conf 'saveplace nil "saveplace")
17
18(desire 'ibuffer)
19;; (desire 'persp-mode)
20;; (desire 'perspective)
21;; (desire 'bufler)
22;; (desire 'tabspaces)
23
24;;}}}
25;;; Appointments, diary, calendar {{{
26
27;; Use "M-x calendar RET" to display the calendar and start
28;; appointment warnings.
29
30;; (desire-conf 'appt)
31(desire 'calendar)
32;; (desire-conf 'todo-mode)
33;; (desire-conf 'diary "diary-lib")
34
35;;;}}}
36;;; These provide options for the various message handling packages {{{
37
38(desire 'browse-url)
39;; (desire-conf 'mailcrypt)
40;; (desire 'supercite)
41
42;;;}}}
3.21 Почта
1;;; Message {{{
2
3(desire 'smtpmail)
4;; (desire 'gnus)
5(desire 'message)
6;; (desire-conf 'vm)
7;; (desire 'wl :ensurename 'wanderlust)
8;; (desire-conf 'sendmail)
9;; (desire 'mu4e-dashboard :recipe '(:fetcher github :repo "rougier/mu4e-dashboard"))
10(desire 'mu4e :precondition-system-executable "mu")
11
12;;;}}}
3.22 Блоги
1;;; Blogs {{{
2
3;; (desire-conf 'hexo nil "hexo")
4;; (desire-conf 'blog-admin nil "blog-admin") ;; Blog admin for emacs with hexo/org-page supported
5(desire-conf 'easy-hugo nil "easy-hugo" t) ;; Emacs major mode for managing hugo
6
7;;;}}}
8;;; Miscellaneous {{{
9
10(desire 'ebuku)
11(desire-conf 'graphviz-dot-mode nil "graphviz-dot-mode")
12;; (desire-conf 'abbrev)
13;; (desire-conf 'bibtex)
14;; (desire-conf 'calc)
15;; (desire-conf 'eiffel-mode)
16;; (desire-conf 'filladapt)
17;; (desire-conf 'hugs-mode)
18;; (desire-conf 'html-helper-mode)
19;; (desire-conf 'lispdir)
20;; (desire-conf 'php-mode)
21;; (desire-conf 'ps-print)
22;; (desire-conf 'sh-script)
23;; (desire-conf 'shell)
24;; (desire-conf 'sql-mode)
25;; (desire-conf 'w3)
26(desire 'web-mode)
27(desire 'gnuplot)
28
29(desire 'pass)
30
31
32(desire 'multiple-cursors)
3.23 Мессенджеры
1(desire 'telega)
3.24 Отложенное чтение
3.24.1 Pocket reader
1(desire 'pocket-reader)
3.24.2 Wallabag
- Подключение пакета:
1(desire 'wallabag :recipe '(:fetcher github :repo "chenyanming/wallabag.el" :branch "master" :files ("*.el" "*.alist" "*.css")))
- Начальные настройки:
- Загрузка пакета:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs 3;;; https://github.com/chenyanming/wallabag.el 4 5(require 'wallabag) 6 7;;; Retrieve new entries after `M-x wallabag` 8(add-hook 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter) 9 10;;; Image Caching. Setting url-automatic-caching non-nil causes documents to be cached automatically 11(setq url-automatic-caching t) 12 13;;;
- Шаблон настройки параметров для пользователя:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs 3;;; https://github.com/chenyanming/wallabag.el 4 5;;; Wallabag server host name 6;; (setq wallabag-host "https://xx.xx.xx") 7 8;;; Username 9;; (setq wallabag-username "xx") 10 11;;; Password 12;; (setq wallabag-password "xx") 13 14;;; Created with API clients management 15;; (setq wallabag-clientid "xx") 16 17;;; Created with API clients management 18;; (setq wallabag-secret "xx") 19 20;;;
3.25 Dashboard
1
2;;;}}}
3
4;; (desire 'grammarly)
5
6;; (desire 'flycheck-grammarly)
7
8(desire 'dashboard)
9
10;; PERSONAL
11
12;; (require 'chord-mode) ; edit guitar music.
13;; (require 'discography) ; variant of BibTeX mode for discographies.
3.26 Разные программные режимы
3.26.1 Начало
- Файл
rc.packages.el
:1;;; Different program modes {{{
3.26.2 Пакет csv-mode
- Emacs. cvs-mode
- Файл
rc.packages.el
: - Установим вызов
cvs-mode
для расширения.cvs
.- Файл
packages/csv-mode/loaddefs.ecf
:
- Файл
- Загружаем пакет при необходимости.
- Файл
packages/csv-mode/desire.ecf
:
- Файл
- Подключим режим визуального выравнивания полей.
- Файл
packages/csv-mode/desire.ecf
:
- Файл
- Настроим визуально представление длинных строк.
- Файл
packages/csv-mode/desire.ecf
:
- Файл
3.26.3 Поддержка ebuild-файлов
- Сайт: https://wiki.gentoo.org/wiki/Project:Emacs
- Файл
rc.packages.el
: - Настроим загрузку:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Edit ebuild and eclass files 3;;; https://wiki.gentoo.org/wiki/Project:Emacs 4;;; https://github.com/emacsmirror/ebuild-mode 5 6(add-to-list 'load-path "/usr/share/emacs/site-lisp/ebuild-mode") 7(autoload 'ebuild-mode "ebuild-mode" 8 "Major mode for Gentoo .ebuild files." t) 9(autoload 'ebuild-eclass-mode "ebuild-mode" 10 "Major mode for Gentoo .eclass files." t) 11(autoload 'ebuild-repo-mode "ebuild-mode" 12 "Minor mode for files in an ebuild repository." t) 13(autoload 'ebuild-repo-mode-maybe-enable "ebuild-mode") 14(autoload 'devbook-mode "devbook-mode" 15 "Major mode for editing the Gentoo Devmanual." t) 16(autoload 'gentoo-newsitem-mode "gentoo-newsitem-mode" 17 "Major mode for Gentoo GLEP 42 news items." t) 18(autoload 'glep-mode "glep-mode" 19 "Major mode for Gentoo Linux Enhancement Proposals." t) 20 21(add-to-list 'auto-mode-alist '("\\.ebuild\\'" . ebuild-mode)) 22(add-to-list 'auto-mode-alist '("\\.eclass\\'" . ebuild-eclass-mode)) 23(add-to-list 'auto-mode-alist '("/devmanual.*\\.xml\\'" . devbook-mode)) 24(add-to-list 'auto-mode-alist 25 '("/[0-9]\\{4\\}-[01][0-9]-[0-3][0-9]-.+\\.[a-z]\\{2\\}\\.txt\\'" 26 . gentoo-newsitem-mode)) 27(add-to-list 'auto-mode-alist '("/glep.*\\.rst\\'" . glep-mode)) 28(add-to-list 'auto-mode-alist 29 '("/\\(package\\.\\(mask\\|unmask\\|use\\|env\ 30\\|license\\|properties\\|accept_\\(keywords\\|restrict\\)\\)\ 31\\|\\(package\\.\\)?use.\\(stable\\.\\)?\\(force\\|mask\\)\\)\\'" 32 . conf-space-mode)) 33(add-to-list 'auto-mode-alist 34 '("/make\\.\\(conf\\|defaults\\)\\'" . conf-unix-mode)) 35(add-to-list 'interpreter-mode-alist '("openrc-run" . sh-mode)) 36(add-to-list 'interpreter-mode-alist '("runscript" . sh-mode)) 37(add-hook 'find-file-hook #'ebuild-repo-mode-maybe-enable) 38(modify-coding-system-alist 'file "\\.\\(ebuild\\|eclass\\)\\'" 'utf-8)
3.26.4 Asymptote
Редактирование файлов Asymptote
- Поддержка редактирования файлов Asymptote.
- Файл
rc.packages.el
: - Конфигурационный файл:
1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; 2D & 3D TeX-Aware Vector Graphics Language 3;;; https://github.com/vectorgraphics/asymptote 4 5(autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t) 6(autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t) 7(autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t) 8(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode)) 9 10;;;
Поддержка Asymptote в Babel
- Репозиторий: https://github.com/hurrja/ob-asymptote
- Необходимо установить программу Asymptote: http://asymptote.sourceforge.net/
3.26.5 kmonad-файлы
- Поддержка синтаксиса конфигурационных файлов kmonad.
- Файл
rc.packages.el
: - Конфигурационный файл:
3.26.6 Julia
1;;; Julia {{{
2
3;;; Code completion and syntax checking
4 ;(desire 'eglot-jl)
5;;; REPL integration
6(desire 'julia-snail)
7;; (desire 'julia-repl)
8;;; Syntax highlighting and latex symbols
9(desire 'julia-mode)
Конец
- Файл
rc.packages.el
:1;;;}}}
- Файл
3.26.7 Разное
1(desire 'speedbar)
2;; (desire-conf 'semantic nil "semantic")
3
4;; (desire-conf 'cedet nil "cedet")
5;; (desire-conf 'ecb nil "ecb")
6
7;; (desire-conf 'php-mode nil "php-mode")
8;; (desire-conf 'eiffel-mode nil "eiffel-mode")
9
10(desire 'ebib)
11
12(desire 'lua-mode)
1
2
3(desire 'yaml-mode)
4(desire 'ini-mode)
5(desire 'hcl-mode)
6
7(desire 'magit-gitflow)
8(desire 'magit)
3.26.8 Конец
- Файл
rc.packages.el
:1;;;}}}
3.27 Редактирование текста в броузере
3.27.1 Начало
- Файл
rc.packages.el
:1;;; Edit text areas in browsers {{{
3.27.2 Edit with Emacs
- Файл
rc.packages.el
:1(desire 'edit-server)
- Файл
packages/edit-server.ecf
:1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; A Chromium/Firefox "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension. 3;;; https://github.com/stsquad/emacs_chrome 4 5(require 'edit-server) 6 7(setq edit-server-new-frame nil) 8(edit-server-start) 9 10(setq edit-server-url-major-mode-alist 11 '(("github\\.com" . markdown-mode))) 12 13;;;
3.27.3 Ghost Text
- Файл
rc.packages.el
:1;; (desire 'atomic-chrome)
- Файл
packages/atomic-chrome.ecf
:1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Edit text area on Chrome with Emacs using Atomic Chrome 3;;; https://github.com/alpha22jp/atomic-chrome 4 5(require 'atomic-chrome) 6(atomic-chrome-start-server) 7 8;;; Atomic Chrome for Emacs automatically reflects modifications to the browser by default 9(setq atomic-chrome-enable-auto-update t) 10 11;;; The default major mode of editing buffer is `text-mode`. You can change the major mode manually 12(setq atomic-chrome-default-major-mode 'markdown-mode) 13 14;;; Choose the major mode for a specific website 15(setq atomic-chrome-url-major-mode-alist 16 '(("github\\.com" . gfm-mode) 17 ("redmine" . textile-mode))) 18 19;;; Select editing buffer style 20;;; full: Open in the selected window. 21;;; split: Open in the new window by splitting the selected window (default). 22;;; frame: Create a new frame and window in it. 23;; (setq atomic-chrome-buffer-open-style split) 24 25;;;
3.27.4 Конец
- Файл
rc.packages.el
:1;;;}}}
3.28 Навигация по файлам
3.28.1 Dired
- Файл
rc.packages.el
:1;;; Dired {{{ 2 3(desire 'mouse3 :recipe '(:fetcher github :repo "emacsmirror/mouse3" :branch "master" :files ("*.el"))) 4 5(desire 'dired) 6(desire 'dired+ :recipe '(:fetcher github :repo "emacsmirror/dired-plus" :branch "master" :files ("*.el"))) 7 8;; (desire 'ranger) 9;; (desire 'efar) 10;; (desire 'sunrise-commander :recipe '(:fetcher github :repo "sunrise-commander/sunrise-commander")) 11(desire 'dirvish) 12;; (desire 'diredc) 13 14;;;}}}
3.28.2 Neotree
- Emacs. Neotree
- Файл
rc.packages.el
:1;; (desire 'neotree)
3.28.3 Treemacs
- Файл
rc.packages.el
:1(desire 'treemacs)
3.29 Навигация по тексту
3.29.1 Начало
- Файл
rc.packages.el
:1;;; Text navigation {{{
3.29.2 line-reminder
- Line annotation for changed and saved lines: https://github.com/emacs-vs/line-reminder
- Файл
rc.packages.el
: - Файл
rc.packages.el
:1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*- 2;;; Line annotation for changed and saved lines 3;;; https://github.com/emacs-vs/line-reminder 4 5;;; Enable for all buffers 6(global-line-reminder-mode t) 7 8;;; Display Annotation 9;;; linum | indicators 10(setq line-reminder-show-option 'linum) 11 12;;; Display thumbnail 13(setq line-reminder-thumbnail t) 14 15;;;
3.29.3 Конец
- Файл
rc.packages.el
:1;;;}}}
3.30 Modeline
3.30.1 Начало
- Файл
rc.packages.el
:1;;; Modeline {{{
3.30.2 Общие настройки modeline
Загрузим только конфигурационный файл:
1(desire-conf 'modeline)
Заголовок файла:
Показывать столбец, в котором находится курсор (https://www.gnu.org/software/emacs/manual/html_node/efaq/Displaying-the-current-line-or-column.html):
Задаём 24-часовой формат времени:
Мы можем захотеть видеть и секунды:
1;;; Display time in seconds in the mode line 2;;; %H is the hour on a 24-hour clock, %I is on a 12-hour clock, 3;;; %k is like %H only blank-padded, %l is like %I blank-padded. 4;;; %p is the locale's equivalent of either AM or PM. 5;;; %M is the minute, %S is the second. 6(setq display-time-format "%H:%M:%S") 7(setq display-time-interval 1)
Разрешим показывать время в модлайн:
3.30.3 Конец
- Файл
rc.packages.el
:1;;;}}}
3.31 Темы
- Подключаем темы в файле
rc.packages.el
:1;;; Themes {{{ 2 3;;; Nested menu for minor modes 4(desire 'minions) 5 6;;; Tabs and ribbons for the mode-line 7(desire 'moody) 8 9;;; Spacemacs theme 10;; (desire 'spacemacs-theme :precondition-lisp-library "spacemacs-theme-pkg") 11 12;;; Doom themes 13;; (desire 'doom-themes) 14 15;; (desire 'zenburn-theme) 16;; (desire 'lambda-themes :recipe '(:fetcher github :repo "Lambda-Emacs/lambda-themes" :branch "main")) 17;; (desire 'tao-theme) 18 19;;; N Λ N O Theme 20;; (desire 'nano-theme) 21 22;;; Increase the padding/spacing of frames and windows 23;; (desire 'spacious-padding)
3.31.1 Modus-themes
- Emacs. Темы. Modus-themes
- Подключаем темы в файле
rc.packages.el
:1;; (desire 'modus-themes)
3.31.2 Ef-themes
- Emacs. Темы. Ef-themes
- Подключаем темы в файле
rc.packages.el
:1(desire 'ef-themes)
3.31.3 Финализирование
- Финализируем раздел в
rc.packages.el
:
3.32 Финализирование
- Финализируем файл
rc.packages.el
: