Changeset d8c64ac in dotfiles
- Timestamp:
- Dec 6, 2021, 4:39:37 AM (3 years ago)
- Branches:
- master
- Children:
- bec93c6
- Parents:
- 1c3e74e (diff), fd65e09 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 6 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
X/.Xdefaults
r1c3e74e rd8c64ac 1 1 ! Default emacs colors 2 XTerm.foreground: #0000003 XTerm.background: #ffffff4 XTerm*cursorColor: #0000002 !XTerm.foreground: #000000 3 !XTerm.background: #ffffff 4 !XTerm*cursorColor: #000000 5 5 6 6 ! Black / Grey 7 XTerm.color0: #0000008 XTerm*color8: #bebebe7 !XTerm.color0: #000000 8 !XTerm*color8: #bebebe 9 9 10 10 ! Red / Bright Red 11 XTerm*color1: #8b000012 XTerm*color9: #ff450011 !XTerm*color1: #8b0000 12 !XTerm*color9: #ff4500 13 13 14 14 ! Green + Bright Green 15 XTerm*color2: #99cc9916 XTerm*color10: #9ec40015 !XTerm*color2: #99cc99 16 !XTerm*color10: #9ec400 17 17 18 18 ! ! Yellow (Orange) + Bright Yellow (Yellow) 19 XTerm*color3: #cd850020 XTerm*color11: #cdcd0019 !XTerm*color3: #cd8500 20 !XTerm*color11: #cdcd00 21 21 22 22 ! Blue + Bright Blue 23 XTerm*color4: #6699cc24 XTerm*color12: #6699cc23 !XTerm*color4: #6699cc 24 !XTerm*color12: #6699cc 25 25 26 26 ! Magenta (Purple) + Bright Magenta 27 XTerm*color5: #cc99cc28 XTerm*color13: #b777e027 !XTerm*color5: #cc99cc 28 !XTerm*color13: #b777e0 29 29 30 30 ! Cyan (Aqua) + Bright Cyan 31 XTerm*color6: #66cccc32 XTerm*color14: #54ced631 !XTerm*color6: #66cccc 32 !XTerm*color14: #54ced6 33 33 34 34 ! Light Grey (Selection) + White (Current Line) 35 XTerm*color7: #51515136 XTerm*color15: #39393935 !XTerm*color7: #515151 36 !XTerm*color15: #393939 37 37 38 38 ! Xterm … … 42 42 XTerm.locale: false 43 43 XTerm.vt100.scrollbar.width: 6 44 XTerm.vt100.faceName: DeJavu Sans Mono:size=1 2.544 XTerm.vt100.faceName: DeJavu Sans Mono:size=14.5 45 45 XTerm.vt100.font: 7x15 46 46 XTerm.vt100.allowBoldFonts: true 47 XTerm.faceSize: 1 2.547 XTerm.faceSize: 14.5 48 48 *.faceName: DeJavu Sans Mono:size=16 49 49 XTerm.renderFont: True -
cvs/.gitconfig
r1c3e74e rd8c64ac 1 1 [user] 2 2 name = Mikhail Kirillov 3 email = w96k@ posteo.net3 email = w96k@riseup.net 4 4 [gpg] 5 5 program = gpg2 … … 10 10 [sendemail] 11 11 smtpEncryption = tls 12 smtpServer = smtp. gmail.com13 smtpUser = w96k@ posteo.net12 smtpServer = smtp.riseup.net 13 smtpUser = w96k@riseup.net 14 14 smtpServerPort = 587 -
emacs/.emacs.d/.emacs-config.org
r1c3e74e rd8c64ac 18 18 19 19 Из программирования поддерживаются /C/, /Python/, /Common Lisp / Scheme/, 20 /Ruby/, /SML/, SQL и редактирование веб-шаблонов. Для систем контроля версий20 /Ruby/, PHP, /SML/, SQL и редактирование веб-шаблонов. Для систем контроля версий 21 21 использую встроенный /VC/ и в некоторых случаях /Magit/. Для входа в 22 22 виртуальные среды используется Direnv. … … 29 29 30 30 Для установки необходимо установить пакеты Emacs из ~../../guix/user.scm~ 31 и выполнить tangle файла при помощи /M-x org-babel-tangle-file/. 32 33 Также доступно на моём сайте: 31 и выполнить tangle файла при помощи /M-x org-babel-tangle-file/. В 32 дальнейшем для развёртывания конфигурации можно использовать /M-x 33 config-tangle/ или /M-x config-load/. 34 35 Также эта конфигурация доступна на моём сайте: 34 36 https://w96k.ru/emacs.html 35 37 … … 48 50 | Auctex | Поддержка Tex и Latex | 49 51 | Browse Kill Ring | Обзор буфера обмена | 50 | Beginend | Переход к семантическому началу и концу буфера |51 52 | Haskell Mode | Поддержка Haskell | 52 53 | Idris Mode | Поддержка Idris | … … 83 84 | Web Mode | Поддержка веб-шаблонов | 84 85 85 Раскомментируйте и исполните следующий блок, если хотите разово установить пакеты через Melpa 86 Следующий блок нужен для тех, кто хочет использовать встроенный пакетный 87 менеджер. Я использую Guix для большей части взаимодействий со сторонним 88 кодом. 86 89 #+begin_src emacs-lisp :tangle init.el 87 90 (require 'package) … … 89 92 (package-initialize) 90 93 91 (if (eq system-type 'berkeley-unix) 94 (if (or (eq system-type 'berkeley-unix) 95 (string-match-p (regexp-quote "Debian") 96 (shell-command-to-string "lsb_release -d | awk -F\"\t\" '{print $2}'"))) 92 97 (progn 93 98 (when (not package-archive-contents) 94 99 (package-refresh-contents)) 95 100 (package-install 'all-the-icons) 96 (package-install 'a ll-the-icons-dired)101 (package-install 'aggressive-completion) 97 102 (package-install 'avy) 103 (package-install 'anzu) 98 104 (package-install 'anaconda-mode) 99 105 (package-install 'auctex) … … 101 107 (package-install 'beginend) 102 108 (package-install 'composer) 109 (package-install 'debian-el) 110 (package-install 'dpkg-dev-el) 111 (package-install 'edebug-inline-result) 103 112 (package-install 'haskell-mode) 104 113 (package-install 'idris-mode) 105 114 (package-install 'magit) 115 (package-install 'git-dwim) 106 116 (package-install 'gitpatch) 107 117 (package-install 'goto-chg) … … 121 131 (package-install 'guix) 122 132 (package-install 'git-gutter) 133 (package-install 'gnuplot) 134 (package-install 'swiper) 123 135 (package-install 'org-roam) 124 (package-install 'org-r ef)125 (package-install ' gnuplot)136 (package-install 'org-roam-ui) 137 (package-install 'on-screen) 126 138 (package-install 'nix-mode) 127 139 (package-install 'pdf-tools) 128 140 (package-install 'phpactor) 141 (package-install 'ac-php) 129 142 (package-install 'php-mode) 143 (package-install 'php-quickhelp) 130 144 (package-install 'php-boris) 145 (package-install 'phan) 146 (package-install 'php-cs-fixer) 147 (package-install 'php-eldoc) 148 (package-install 'phps-mode) 149 (package-install 'projectile) 131 150 (package-install 'kiwix) 132 151 (package-install 'sml-mode) 133 152 (package-install 'slime) 134 153 (package-install 'simple-httpd) 135 (package-install 'telega)136 154 (package-install 'treemacs) 137 155 (package-install 'undo-tree) 138 156 (package-install 'yasnippet) 139 157 (package-install 'yasnippet-snippets) 140 (package-install 'web-mode))) 158 (package-install 'vimrc-mode) 159 (package-install 'flymake-phpcs) 160 (package-install 'flymake-phpstan) 161 (package-install 'web-mode) 162 (package-install 'which-key) 163 (package-install 'reverse-im))) 141 164 #+end_src 142 165 143 166 * Инициализация 144 ** Ускоряем сборку мусора 167 Следующие блоки кода выводят в файл early-init.el 168 ** Компиляция 169 JIT компиляция elisp кода в машинный 170 #+begin_src elisp :tangle early-init.el 171 (when (eq window-system 'pgtk) 172 (pgtk-use-im-context t)) 173 174 (when (fboundp 'native-compile-async) 175 (setq comp-async-compilation t 176 comp-native-compiling t 177 native-comp-speed 2 178 native-comp-async-jobs-number 2 179 comp-num-cpus 4 180 ;; JIT Compilation 181 native-comp-deferred-compilation t 182 ;; AOT Compilation 183 package-native-compile t 184 comp-async-report-warnings-errors nil)) 185 #+end_src 186 *** Ручная компиляция 187 #+begin_src elisp :tangle nil :results nil 188 (native-compile-async "~/.emacs.d/elpa/" 'recursively) 189 (native-compile-async "~/.guix-profile/share/emacs/site-lisp" 'recursively) 190 191 ;; block until native compilation has finished 192 (while (or comp-files-queue 193 (> (comp-async-runnings) 0)) 194 (sleep-for 1)) 195 #+end_src 196 197 ** Ускоряем сборку мусора 145 198 #+begin_src emacs-lisp :tangle early-init.el 146 199 ;; -*- lexical-binding: t -*- … … 160 213 161 214 ** Редактируем GUI 162 Удаляем ненужные бары, меняем шрифт и модлайн. 215 Удаляем ненужные бары, меняем шрифт и модлайн. Использую дефолтный для 216 Emacs шрифт DeJavu, так как он является одним из самых интернациональных 217 шрифтов по количеству доступных символов. 163 218 #+begin_src emacs-lisp :tangle early-init.el 164 219 ;; Do not resize the frame at this early stage. … … 166 221 (setq use-dialog-box nil) 167 222 168 ;;; Disable some gui223 ;;; Disable some gui 169 224 (scroll-bar-mode -1) 170 225 (tool-bar-mode -1) 171 226 (menu-bar-mode -1) 172 227 (tooltip-mode -1) 173 174 ;;; Change font to mono in line:column string175 (defface mode-line-position-face176 '((t (:font "DejaVu Sans Mono" :height 125)))177 "Monospace font"178 :group 'basic-faces)179 180 181 ;; Change line:column format182 (setq-default mode-line-position183 (list184 (propertize "%2l:%c" 'face 'mode-line-position-face)))185 228 186 229 ;; Change mode-line-modes to show only major mode … … 190 233 `(:propertize ("" mode-name) 191 234 help-echo "Major mode\n\ 192 mouse-1: Display major mode menu\n\193 mouse-2: Show help for major mode\n\194 mouse-3: Toggle minor modes"235 mouse-1: Display major mode menu\n\ 236 mouse-2: Show help for major mode\n\ 237 mouse-3: Toggle minor modes" 195 238 mouse-face mode-line-highlight 196 239 local-map ,mode-line-major-mode-keymap) … … 206 249 (put 'mode-line-major-mode 'risky-local-variable t) 207 250 208 209 ;; (defvar long-path (let ((path-list (cdr (split-string buffer-file-name "/"))))210 ;; (if (and (eq system-type 'berkeley-unix)211 ;; (equal (nth 0 path-list) "usr")212 ;; (equal (nth 1 path-list) "home"))213 ;; (mapconcat 'identity214 ;; (reverse (append '("") (cdr (reverse (append '("~") (cdr (cdr (cdr path-list)))))))) "/"))))215 216 217 251 ;; Change mode-line-format 218 252 (setq-default mode-line-format … … 228 262 mode-line-buffer-identification 229 263 mode-line-misc-info 230 " 264 " " 231 265 mode-line-major-mode 266 " " 267 vc-mode 232 268 " " 233 vc-mode234 " "235 269 236 270 mode-line-position … … 238 272 )) 239 273 240 ;;; Changing emacs defaults 274 ;;; Changing emacs default setting through customize 241 275 (custom-set-variables 276 '(fill-column 72) 277 '(git-gutter:added-sign " ") 278 '(git-gutter:deleted-sign " ") 279 '(git-gutter:modified-sign " ") 280 '(git-gutter:unchanged-sign " ") 242 281 '(tool-bar-position 'left) 243 '(tool-bar-style 'image) 244 '(fill-column 72) 245 '(package-quickstart t)) 282 '(tool-bar-style 'image)) 283 (custom-set-faces 284 '(default ((t (:font "DeJavu Sans Mono" :height 145)))) 285 '(fill-column-indicator ((t (:foreground "grey95")))) 286 '(fringe ((t (:background "grey98")))) 287 '(mode-line ((t (:height 145 :background "grey80" :foreground "grey10")))) 288 '(mode-line-inactive ((t (:inherit mode-line :background "grey90" :foreground "grey20" :box (:line-width (-2 . -2) :color "grey85") :weight light)))) 289 '(vertical-border ((t (:foreground "grey80")))) 290 '(window-divider ((t (:foreground "gray80"))))) 246 291 247 292 (set-fringe-style (cons 7 7)) … … 265 310 266 311 (provide 'early-init) 267 ;;; early-init.el ends here312 ;;; early-init.el ends here 268 313 #+end_src 269 314 270 315 ** Инициализируем остальной конфиг 316 Следующие блоки кода выводят в файл init.el 271 317 #+begin_src emacs-lisp :tangle init.el 272 318 ;; -*- lexical-binding: t -*- … … 302 348 #+END_SRC 303 349 350 ** Конфигурация 351 Базовые функции для манипулирования конфигом в дальнейшем, чтобы не 352 приходилось танглить вручную. 353 #+BEGIN_SRC emacs-lisp :tangle init.el 354 (setq config-dotfiles-path "~/projects/dotfiles/emacs/.emacs.d/" 355 config-path "~/.emacs.d/" 356 config-name ".emacs-config.org") 357 358 (defun config-visit () 359 (interactive) 360 (find-file (concat config-path config-name))) 361 362 (defun config-tangle () 363 (interactive) 364 (org-babel-tangle-file (concat config-dotfiles-path config-name)) 365 ;; Configuration stored in another directory, 366 ;; so I need to move files .emacs.d manually 367 (rename-file (concat config-dotfiles-path "early-init.el") config-path t) 368 (rename-file (concat config-dotfiles-path "init.el") config-path t)) 369 370 (defun config-load () 371 (interactive) 372 (org-babel-load-file (concat config-dotfiles-path config-name) t)) 373 374 #+END_SRC 375 304 376 * Внешний вид 377 Я использую по большей части стандартную тему имакса и стараюсь не менять стандартное поведение. 305 378 ** Назначение шрифтов 306 379 А также отступа между строк … … 308 381 ;;; Set font 309 382 (setq-default line-spacing 0) 310 383 384 (set-language-environment "UTF-8") 385 (set-default-coding-systems 'utf-8-unix) 386 387 ;; set a default font 388 (when (member "DejaVu Sans Mono" (font-family-list)) 389 (set-face-attribute 'default nil :font "DejaVu Sans Mono")) 390 391 ;; specify font for all unicode characters 392 (when (member "Symbola" (font-family-list)) 393 (set-fontset-font t 'unicode "Symbola" nil 'prepend)) 394 311 395 (custom-set-faces 312 '(mode-line ((t (:font "DeJavu Sans"313 :background "gray85"314 :foreground "black"315 :height 145))))316 '(mode-line-inactive ((t (:font "DeJavu Sans"317 :background "grey95"318 :foreground "gray60"319 :height 145))))320 396 '(default ((t (:font "DeJavu Sans Mono" :height 145)))) 321 397 '(fringe ((t (:background "grey98")))) … … 328 404 329 405 ** Отображение номера строк и пробелов 406 Изначально они отключены, но можно вызвать по клавише F7. 330 407 #+BEGIN_SRC emacs-lisp :tangle init.el 331 408 (define-key global-map … … 346 423 #+BEGIN_SRC emacs-lisp :tangle init.el 347 424 (load "all-the-icons-autoloads") 348 (load "all-the-icons-dired-autoloads")349 425 350 426 (setq inhibit-compacting-font-caches t) 351 427 #+END_SRC 352 428 429 ** Скроллинг 430 Помечает на время часть старого буфера при скроллинге. 431 #+BEGIN_SRC emacs-lisp :tangle init.el 432 (load "on-screen-autoloads") 433 (on-screen-global-mode t) 434 #+END_SRC 353 435 * Редактирование 354 436 ** Файловый менеджер … … 360 442 361 443 ** Линтер 444 Использую встроенный Flymake 362 445 #+BEGIN_SRC emacs-lisp :tangle init.el 363 446 (add-hook 'prog-mode-hook 'flymake-mode) … … 372 455 373 456 ** Дерево проекта 457 Возможно в дальнейшем откажусь от этого пакета, так как по факту им 458 пользуюсь нечасто. Он предоставляет дерево проектов, как в IDE. 374 459 #+BEGIN_SRC emacs-lisp :tangle init.el 375 460 (load "treemacs-autoloads") 376 (setq treemacs-width 30 377 treemacs-show-cursor t) 461 462 (setq treemacs-width 50 463 treemacs-show-cursor t 464 treemacs-position 'right 465 treemacs-indentation 1 466 treemacs-tag-follow-mode t 467 treemacs-fringe-indicator-mode nil) 468 378 469 (define-key global-map 379 470 (kbd "C-x C-d") 'treemacs) … … 381 472 382 473 ** Система контроля версий 383 Модуль VC + Magit 384 385 #+BEGIN_SRC emacs-lisp :tangle init.el 474 Модуль VC + Magit. 475 476 | Operation | VC | Magit | 477 |----------------+-----------------------------------------+----------------------| 478 | Project status | project-vc-dir (C-x p v) | magit-status (C-x g) | 479 | Pull | vc-update (F, in my case) | magit-pull (F p) | 480 | New branch | vc-retrieve-tag (C-u B s) | magit-branch (b c) | 481 | Commit | vc-next-action (C-x v v) | magit-commit (c c) | 482 | Rebase | shell-command (M-!) + git rebase master | magit-rebase (r p) | 483 | Push | vc-push (P or C-u P) | magit-push (P p) | 484 | Stash | mu-vc-git-stash (z) | magit-stash (z) | 485 | Log | vc-print-root-log (L) | magit-log (l l) | 486 https://www.manueluberti.eu//emacs/2021/11/27/vc/ 487 488 #+BEGIN_SRC emacs-lisp :tangle init.el 489 (setq vc-command-messages t) 490 491 (load "git-dwim-autoloads") 492 493 (global-set-key "\C-xvB" 'git-branch-next-action) 494 386 495 ;; Use magit only when built-in VC fails 387 496 (load "magit-autoloads") 388 497 (setq magit-refresh-status-buffer nil) 389 498 (global-set-key (kbd "C-x g") 'magit-status) 390 499 391 500 (load "gitpatch-autoloads") 392 501 #+END_SRC … … 404 513 (setq git-gutter-window-width 1) 405 514 406 (eval-after-load "git-gutter" 407 '(set-face-background 'git-gutter:added "#99cc99")) 408 409 (eval-after-load "git-gutter" 410 '(set-face-background 'git-gutter:deleted "#f2777a")) 411 412 (eval-after-load "git-gutter" 413 '(set-face-background 'git-gutter:modified "#ffcc66")) 414 415 (eval-after-load "git-gutter" 515 (with-eval-after-load "git-gutter" 516 '(set-face-background 'git-gutter:added "#99cc99") 517 '(set-face-background 'git-gutter:deleted "#f2777a") 518 '(set-face-background 'git-gutter:modified "#ffcc66") 416 519 '(set-face-background 'git-gutter:unchanged "#f6f5f4")) 417 520 … … 431 534 ;; Прыжок на последнее изменение 432 535 (load "goto-chg-autoloads") 536 (setq glc-default-span 2) 433 537 (define-key global-map (kbd "C-z") 'goto-last-change) 434 538 (define-key global-map (kbd "M-z") 'goto-last-change-reverse) … … 439 543 440 544 ;; Dumb Jump 441 ;; M-. default is 'xref-find-definitionsn442 545 (load "dumb-jump-autoloads") 443 546 (define-key global-map (kbd "C-.") 'dumb-jump-go) … … 476 579 #+BEGIN_SRC emacs-lisp :tangle init.el 477 580 (load "browse-kill-ring-autoloads") 478 #+END_SRC 479 480 ** Expand-region 481 #+begin_src emacs-lisp 482 (load "expand-region-autoloads") 483 (global-set-key (kbd "C--") 'er/expand-region) 484 #+end_src 581 582 (define-key global-map (kbd "C-M-y") 'browse-kill-ring) 583 #+END_SRC 485 584 486 585 ** Tags … … 501 600 (shell-command 502 601 (format "%s -f TAGS -e -R --fields=+l --languages=python --python-kinds=-iv $(python -c \"import os, sys; print(' '.join('{}'.format(d) for d in sys.path if os.path.isdir(d)))\") %s" path-to-ctags 503 (directory-file-name dir-name)))) 504 505 506 #+END_SRC 507 602 (directory-file-name dir-name)))) 603 #+END_SRC 604 605 ** Дополнение 606 *** Автодополнение и документация 607 По большей части я использую дефолтный Completion buffer, но для работы 608 вынужден использовать company ради PHP. 609 #+begin_src elisp :tangle init.el 610 ;;(require 'auto-complete) 611 612 (setq ac-use-menu-map t) 613 (setq ac-menu-height 20) 614 (setq ac-ignore-case t) 615 ;;(ac-config-default) 616 #+end_src 617 *** Модификация дефолта 618 #+BEGIN_SRC emacs-lisp :tangle init.el 619 (setq ;;completion-styles '(flex) 620 completion-ignore-case t 621 read-buffer-completion-ignore-case t 622 read-file-name-completion-ignore-case t) 623 #+END_SRC 624 *** Агрессивный дефолтный комплит 625 #+BEGIN_SRC emacs-lisp :tangle init.el 626 (load "aggressive-completion-autoloads") 627 628 (setq aggressive-completion-delay 0.5) 629 (aggressive-completion-mode t) 630 #+END_SRC 631 *** HELM (не используется) 632 #+BEGIN_SRC emacs-lisp :results nil :tangle nil 633 (load "helm-autoloads") 634 635 (setq helm-completion-style 'emacs 636 helm-no-header t) 637 638 (global-set-key (kbd "M-x") #'helm-M-x) 639 (global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks) 640 (global-set-key (kbd "C-x C-f") #'helm-find-files) 641 (global-set-key (kbd "C-x C-b") #'helm-buffers-list) 642 (global-set-key (kbd "C-s") #'helm-occur) 643 (global-set-key (kbd "M-y") #'helm-show-kill-ring) 644 (global-set-key (kbd "C-x b") #'helm-mini) 645 646 (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) 647 (define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) 648 (define-key helm-map (kbd "C-z") 'helm-select-action) 649 (define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history) 650 651 (setq helm-display-header-line nil 652 helm-split-window-in-side-p t 653 helm-echo-input-in-header-line t 654 helm-display-source-at-screen-top nil 655 helm-autoresize-max-height 50 656 helm-autoresize-min-height 5) 657 658 (helm-adaptive-mode) 659 (helm-autoresize-mode 1) 660 661 (add-hook 'eshell-mode-hook 662 (lambda () 663 (eshell-cmpl-initialize) 664 (define-key eshell-mode-map (kbd "C-c C-l") 'helm-eshell-history) 665 (define-key eshell-mode-map [remap eshell-pcomplete] 'helm-esh-pcomplete) 666 (define-key eshell-mode-map (kbd "M-p") 'helm-eshell-history))) 667 668 (add-hook 'eshell-mode-hook 669 (lambda () 670 (define-key eshell-mode-map 671 (kbd "M-p") 672 'helm-eshell-history))) 673 674 (defun pcomplete/sudo () 675 (let ((prec (pcomplete-arg 'last -1))) 676 (cond ((string= "sudo" prec) 677 (while (pcomplete-here* 678 (funcall pcomplete-command-completion-function) 679 (pcomplete-arg 'last) t)))))) 680 681 (helm-mode 1) 682 683 #+END_SRC 508 684 ** Полнотекстовый поиск 509 685 Для выхода из поиска -- C-c C-q … … 536 712 537 713 ** Клиент LSP 538 #+begin_src emacs-lisp :tangle init.el714 #+begin_src emacs-lisp :tangle nil 539 715 (load "eglot-autoloads") 540 716 (require 'eglot) … … 563 739 (add-hook 'c-mode-hook 'eglot-ensure) 564 740 (add-hook 'c++-mode-hook 'eglot-ensure) 565 (add-hook 'php-mode-hook 'eglot-ensure)566 741 #+end_src 567 742 743 ** Линтеры 744 #+BEGIN_SRC emacs-lisp :tangle init.el 745 (add-hook 'php-mode-hook 'flymake-php-load) 746 (add-hook 'php-mode-hook 'flymake-phpstan-turn-on) 747 (add-hook 'php-mode-hook 'flymake-phpcs-load) 748 #+END_SRC 749 ** Выделение 750 #+BEGIN_SRC emacs-lisp :tangle init.el 751 (load "expand-region-autoloads") 752 753 (global-set-key (kbd "C-=") 'er/expand-region) 754 #+END_SRC 755 756 ** Сессия 757 #+BEGIN_SRC emacs-lisp :tangle init.el 758 (desktop-save-mode nil) 759 #+END_SRC 760 ** Скроллинг 761 #+BEGIN_SRC emacs-lisp :tangle init.el 762 (setq scroll-margin 0) 763 #+END_SRC 764 ** Поиск 765 *** Подсчёт кандидатов 766 #+BEGIN_SRC emacs-lisp :tangle init.el 767 (global-anzu-mode t) 768 #+END_SRC 769 *** Swiper (не используется) 770 #+BEGIN_SRC emacs-lisp :result nil :tangle nil 771 (load "swiper-autoloads") 772 (global-set-key (kbd "C-s") 'swiper) 773 774 (setq swiper-include-line-number-in-search t 775 swiper-use-visual-line t 776 swiper-stay-on-quit t) 777 #+END_SRC 778 ** Подсказка биндов 779 Пакет Which-key 780 #+begin_src elisp :tangle init.el 781 (load "which-key-autoloads") 782 (which-key-setup-side-window-right) 783 (which-key-mode) 784 785 (setq which-key-side-window-max-width 0.75 786 which-key-show-remaining-keys t 787 which-key-max-display-columns 50 788 which-key-max-description-length 35 789 which-key-sort-order 'which-key-local-then-key-order 790 which-key-idle-delay 0.25) 791 #+end_src 792 568 793 * Языки программирования 569 794 ** Common Lisp … … 600 825 601 826 ** Python 827 *** Автодополнение и линт 602 828 #+BEGIN_SRC emacs-lisp :tangle init.el 603 829 (load "anaconda-mode-autoloads") 604 830 (add-hook 'python-mode-hook 'anaconda-mode) 605 831 (add-hook 'python-mode-hook 'anaconda-eldoc-mode) 606 832 833 (setq python-shell-interpreter "python3") 834 835 607 836 (when (load "flymake" t) 608 837 (defun flymake-pylint-init () … … 613 842 (file-name-directory buffer-file-name)))) 614 843 (list "epylint" (list local-file)))) 615 844 616 845 (add-to-list 'flymake-allowed-file-name-masks 617 846 '("\\.py\\'" flymake-pylint-init))) 618 847 619 848 (add-hook 'python-mode-hook 'flymake-mode) 620 849 #+END_SRC 621 850 *** Прыжки в функции стандартной библиотеки на си 622 851 ** SML 623 852 #+BEGIN_SRC emacs-lisp :tangle init.el … … 629 858 *** PHP-Mode 630 859 Не осуждайте 631 #+begin_src emacs-lisp 860 #+begin_src emacs-lisp :tangle init.el 632 861 (load "php-mode-autoloads") 862 (setq php-manual-path 863 "~/.emacs.d/php-manual/") 864 865 (add-hook 'php-mode-hook 866 '(lambda () 867 (auto-complete-mode t) 868 869 (require 'ac-php) 870 (setq ac-sources '(ac-source-php)) 871 872 (require 'php-quickhelp) 873 (setq eldoc-documentation-function 874 'php-quickhelp-eldoc-func) 875 876 ;;(yas-minor-mode 1) 877 878 (define-key php-mode-map (kbd "C-M-i") 'auto-complete) 879 880 (define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 881 882 (define-key php-mode-map (kbd "C-c H") 883 'php-local-manual-search) 884 885 (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 886 (define-key ac-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 887 888 (define-key php-mode-map (kbd "C-c t") 'ac-php-show-tip) 889 890 (set (make-local-variable 'company-backends) 891 '((company-ac-php-backend company-dabbrev-code) 892 company-capf company-files)) 893 894 ;; Jump to definition (optional) 895 (define-key php-mode-map 896 (kbd "M-.") 'ac-php-find-symbol-at-point) 897 898 ;; Return back (optional) 899 (define-key php-mode-map 900 (kbd "M-,") 'ac-php-location-stack-back))) 633 901 #+end_src 634 902 635 903 *** Composer 636 #+begin_src emacs-lisp 904 #+begin_src emacs-lisp :tangle init.el 637 905 (load "composer-autoloads") 638 906 #+end_src 639 907 640 908 *** Flymake PHP 641 #+begin_src emacs-lisp 909 #+begin_src emacs-lisp :tangle init.el 642 910 (load "flymake-php-autoloads") 643 911 #+end_src … … 645 913 *** REPL 646 914 Пакет Boris 647 #+begin_src emacs-lisp 915 #+begin_src emacs-lisp :tangle init.el 648 916 (load "php-boris-autoloads") 649 917 #+end_src … … 651 919 *** LSP сервер 652 920 PHPactor 653 #+begin_src emacs-lisp 921 #+begin_src emacs-lisp :tangle nil 654 922 (with-eval-after-load 'php-mode 655 923 (define-key php-mode-map (kbd "M-.") #'phpactor-goto-definition) … … 657 925 #+end_src 658 926 659 660 927 *** Transient меню 661 #+begin_src emacs-lisp 928 #+begin_src emacs-lisp :tangle nil 662 929 (require 'transient) 663 (define-transient-command php- transient-menu ()930 (define-transient-command php-menu () 664 931 "Php" 665 932 [["Class" … … 691 958 #+end_src 692 959 960 *** Интеграция с Semantic и EDE 961 #+BEGIN_SRC emacs-lisp :tangle init.el 962 963 #+END_SRC 693 964 * Языки декларирования 694 965 ** SQL … … 696 967 ;; Empty for now (was using emacsql) 697 968 #+END_SRC 969 698 970 ** Веб шаблоны 699 971 *** Web-mode … … 711 983 #+BEGIN_SRC emacs-lisp :tangle init.el 712 984 (org-babel-do-load-languages 'org-babel-load-languages 713 '((shell . t))) 985 '((shell . t) 986 (python . t))) 714 987 715 988 (global-set-key (kbd "C-c l") 'org-store-link) … … 751 1024 #+END_SRC 752 1025 753 | NEXT | :foreground | blue | :weight | bold | 754 | DONE | :foreground | forest green | :weight | bold | 755 | WAITING | :foreground | orange | :weight | bold | 756 | HOLD | :foreground | magenta | :weight | bold | 757 | CANCELLED | :foreground | forest green | :weight | bold | 758 | MEETING | :foreground | forest cyan | :weight | bold | 759 | PHONE | :foreground | blue | :weight | bold | 760 761 *** Org-ref 762 763 #+begin_src emacs-lisp :tangle init.el 1026 *** Org-ref (не используется) 1027 1028 #+begin_src emacs-lisp :tangle nil 764 1029 (load "org-ref-autoloads") 765 1030 … … 773 1038 774 1039 *** Org-roam 775 #+begin_src emacs-lisp :tangle init.el 1040 #+begin_src elisp :tangle init.el 1041 (setq org-roam-directory (file-truename "~/Documents/Notes") 1042 org-roam-graph-viewer "icecat" 1043 org-roam-v2-ack t 1044 org-roam-completion-everywhere t 1045 org-roam-index-file (concat org-roam-directory "/20210409054712-жизнь.org")) 1046 776 1047 (require 'org-roam) 777 778 (setq org-roam-directory "~/Documents/Notes" 779 org-roam-graph-viewer "icecat" 780 org-roam-index-file (concat org-roam-directory "/20210409054712-жизнь.org")) 781 782 (add-hook 'after-init-hook 'org-roam-mode) 783 784 (define-key org-roam-mode-map 785 (kbd "C-c n n") 'org-roam) 786 (define-key org-roam-mode-map 787 (kbd "C-c n l") 'org-roam-insert) 788 (define-key org-roam-mode-map 789 (kbd "C-c n f") 'org-roam-find-file) 790 (define-key org-roam-mode-map 1048 (load "org-roam-ui-autoloads") 1049 (org-roam-db-sync) 1050 1051 (defun org-roam-jump-to-index () 1052 "Stub of recreating the function from V1" 1053 (interactive) 1054 (let 1055 ((org-roam-index org-roam-index-file)) 1056 (find-file org-roam-index))) 1057 1058 (define-key global-map 1059 (kbd "C-c n l") 'org-roam-node-insert) 1060 (define-key global-map 1061 (kbd "C-c n f") 'org-roam-node-find) 1062 (define-key global-map 791 1063 (kbd "C-c n t t") 'org-roam-tag-add) 792 (define-key org-roam-mode-map1064 (define-key global-map 793 1065 (kbd "C-c n t r") 'org-roam-tag-remove) 794 (define-key org-roam-mode-map1066 (define-key global-map 795 1067 (kbd "C-c n i") 'org-roam-jump-to-index) 796 (define-key org-roam-mode-map1068 (define-key global-map 797 1069 (kbd "C-c n g") 'org-roam-graph) 798 (define-key org-roam-mode-map1070 (define-key global-map 799 1071 (kbd "C-c n d") 'org-roam-db-build-cache) 800 (define-key org-roam-mode-map801 (kbd "C-c n r n") 'org-roam-random-note)802 (define-key org-roam-mode-map1072 (define-key global-map 1073 (kbd "C-c n r") 'org-roam-node-random) 1074 (define-key global-map 803 1075 (kbd "C-c n j") 'org-roam-dailies-find-date) 804 1076 #+end_src … … 807 1079 Агенда для org-roam 808 1080 #+BEGIN_SRC emacs-lisp :tangle init.el 809 ( require 'cl-lib)1081 (load "cl-lib") 810 1082 (defvar roam-extra-original-org-agenda-files nil 811 1083 "Original value of `org-agenda-files'.") … … 869 1141 (load "telega-autoloads") 870 1142 (load "emojify-autoloads") 871 1143 1144 1145 872 1146 (setq telega-filter-custom-show-folders nil 873 1147 telega-chat-fill-column 50 874 1148 telega-root-fill-column 50 875 1149 telega-url-shorten-use-images t) 876 1150 877 1151 (set-fontset-font t 'unicode "Unifont" nil 'append) 878 1152 879 1153 (define-key global-map (kbd "C-c t") telega-prefix-map) 880 1154 #+END_SRC … … 930 1204 *** Переменная PATH в eshell 931 1205 #+BEGIN_SRC emacs-lisp :tangle init.el 932 (load "exec-path-from-shell-autoloads") 933 (when (and (memq window-system '(mac ns x)) 934 (not (eq system-type 'berkeley-unix))) 935 (exec-path-from-shell-initialize)) 1206 (load "exec-path-from-shell-autoloads") 1207 (setq exec-path-from-shell-variables 1208 '("PATH" "MANPATH")) 1209 1210 (when (and (memq window-system '(mac ns x)) 1211 (not (eq system-type 'berkeley-unix))) 1212 (exec-path-from-shell-initialize)) 936 1213 #+END_SRC 937 1214 … … 951 1228 #+BEGIN_SRC emacs-lisp :tangle init.el 952 1229 ;; GTK menu doesn't allow emacs-style navigation 953 ;;(define-key global-map (kbd "<f10>") 'tmm-menubar)1230 (define-key global-map (kbd "<f10>") 'tmm-menubar) 954 1231 #+END_SRC 955 1232 … … 972 1249 #+END_SRC 973 1250 1251 *** Вернуться в предыдущий буфер 1252 #+BEGIN_SRC emacs-lisp :tangle init.el 1253 (define-key global-map (kbd "C-q C-q") 'previous-buffer) 1254 (define-key global-map (kbd "C-S-q C-S-q") 'next-buffer) 1255 #+END_SRC 1256 *** Смена раскладки (EN / RU) и поддержка биндов на других языках 1257 Работает на C-\ 1258 #+begin_src elisp :tangle init.el 1259 (set-input-method "russian-computer") 1260 (toggle-input-method) 1261 #+end_src 1262 974 1263 ** Браузер 975 1264 #+begin_src emacs-lisp :tangle init.el … … 986 1275 #+end_src 987 1276 1277 ** Debian 1278 Инструменты для работы с пакетным менеджером Debian'а apt'ом и смежными 1279 инструментами. 1280 #+begin_src elisp :tangle init.el 1281 (load "debian-el-autoloads") 1282 (load "dpkg-dev-el-autoloads") 1283 #+end_src 1284 988 1285 ** Guix 989 1286 #+BEGIN_SRC emacs-lisp :tangle init.el … … 993 1290 994 1291 ** Vim 995 #+begin_src emacs-lisp 1292 #+begin_src emacs-lisp :tangle init.el 996 1293 (load "vimrc-mode-autoloads") 997 1294 (add-to-list 'auto-mode-alist '("\\.vim\\(rc\\)?\\'" . vimrc-mode)) … … 1060 1357 (setq gc-cons-percentage 0.1) 1061 1358 #+end_src 1062 1359 ** Фуллскрин 1360 Отображать ровно столько строчек, сколько вмещает экран. 1361 1362 Не работает с native-comp. 1363 1364 #+begin_src elisp :tangle init.el 1365 (toggle-frame-fullscreen) 1366 1367 (defun fullscreen () 1368 "Fullscreen." 1369 (interactive) 1370 (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 1371 ;; if first parameter is '1', can't toggle fullscreen status 1372 '(1 "_NET_WM_STATE_FULLSCREEN" 0))) 1373 #+end_src -
guix/.bash_profile
r1c3e74e rd8c64ac 10 10 11 11 export CC=gcc 12 export LD_LIBRARY_PATH=$ HOME/.guix-profile/lib/12 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.guix-profile/lib/ 13 13 14 14 GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles -
guix/.bashrc
r1c3e74e rd8c64ac 1 # Bash initialization for interactive non-login shells and2 # for remote shells (info "(bash) Bash Startup Files").3 4 # Export 'SHELL' to child processes. Programs such as 'screen'5 # honor it and otherwise use /bin/sh.6 1 export SHELL 7 2 8 # if [[ $- != *i* ]] 3 DISTRO="$(lsb_release -d | awk -F"\t" '{print $2}' | awk -F" " '{print $1}')" 9 4 10 # # We are being invoked from a non-interactive shell. If this 11 # # is an SSH session (as in "ssh host command"), source 12 # # /etc/profile so we get PATH and other essential variables. 13 # [[ -n "$SSH_CLIENT" ]] && source /etc/profile 14 15 # # Don't do anything else. 16 # return 17 # fi 18 19 # bind 'set show-all-if-ambiguous on' 20 # bind 'TAB:menu-complete' 21 22 # Source the system-wide file. 23 source /etc/bashrc 5 if [ "$DISTRO" == "Debian" ]; then 6 source /etc/bash.bashrc 7 else 8 # Source the system-wide file. 9 source /etc/bashrc 10 fi 24 11 25 12 # Adjust the prompt depending on whether we're in 'guix environment'. … … 36 23 alias grep='grep --color=auto' 37 24 25 # set a fancy prompt (non-color, unless we know we "want" color) 26 case "$TERM" in 27 xterm-color|*-256color) color_prompt=yes;; 28 esac 29 30 # colored GCC warnings and errors 31 export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 32 33 export PYTHONSTARTUP="${HOME}/.pyrc" 34 export PYTHONIOENCODING="UTF-8" 35 36 if [ "$DISTRO" == "Debian" ]; then 37 if [ -f ~/.bash_aliases ]; then 38 . ~/.bash_aliases 39 fi 40 41 if ! shopt -oq posix; then 42 if [ -f /usr/share/bash-completion/bash_completion ]; then 43 . /usr/share/bash-completion/bash_completion 44 elif [ -f /etc/bash_completion ]; then 45 . /etc/bash_completion 46 fi 47 fi 48 fi 49 38 50 # Welcome message 39 51 printf "Welcome to bash shell\n\n" 52 -
guix/.config/gtk-3.0/settings.ini
r1c3e74e rd8c64ac 8 8 gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ 9 9 gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR 10 gtk-font-name=DeJavu Sans 10 gtk-font-name=DeJavu Sans 14 11 11 gtk-primary-button-warps-slider=false 12 12 gtk-overlay-scrolling=false 13 gtk-scrollbar-spacing=0 -
guix/.config/guix/channels.scm
r1c3e74e rd8c64ac 1 (use-modules (guix ci)) 2 1 3 (list 2 ;; (channel3 ;; (name 'w96k)4 ;; (url "https://git.sr.ht/~w96k/dotfiles")5 ;; (branch "master"))6 4 (channel 7 5 (name 'guix-gaming) 8 6 (url "https://gitlab.com/guix-gaming-channels/games") 9 7 (branch "master")) 10 (channel 11 (name 'guix) 12 (url "https://git.savannah.gnu.org/git/guix.git") 13 (branch "master"))) 8 (channel-with-substitutes-available 9 %default-guix-channel 10 "https://ci.guix.gnu.org")) 11 12 ;; (list 13 ;; ;; (channel 14 ;; ;; (name 'w96k) 15 ;; ;; (url "https://git.sr.ht/~w96k/dotfiles") 16 ;; ;; (branch "master")) 17 ;; (channel 18 ;; (name 'guix-gaming) 19 ;; (url "https://gitlab.com/guix-gaming-channels/games") 20 ;; (branch "master")) 21 ;; (channel 22 ;; (name 'guix) 23 ;; (url "https://git.savannah.gnu.org/git/guix.git") 24 ;; (branch "master")))
Note:
See TracChangeset
for help on using the changeset viewer.