Changeset 0d64484 in dotfiles
- Timestamp:
- Jul 10, 2020, 10:12:25 PM (4 years ago)
- Branches:
- master
- Children:
- 3c66ce1
- Parents:
- bc317cb
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/.emacs
rbc317cb r0d64484 9 9 ;; (setq debug-on-error t) 10 10 ;; (setq debug-on-quit nil) 11 (with-no-warnings 12 (require 'cl) 13 (require 'cl-lib)) 14 15 ;;(setq gc-cons-threshold 500000000) 11 16 12 17 (setq package-archives … … 19 24 (package-initialize) 20 25 26 (when (not (package-installed-p 'quelpa)) 27 (with-temp-buffer 28 (url-insert-file-contents "https://github.com/quelpa/quelpa/raw/master/quelpa.el") 29 (eval-buffer) 30 (quelpa-self-upgrade))) 31 21 32 ;; Dont ask when following symlinks 22 33 (setq vc-follow-symlinks t) 23 34 24 35 ;; Add path for guix machines 25 (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp/")26 (add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp/")36 ;;(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp/") 37 ;;(add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp/") 27 38 28 39 ;; "Bootstrap" use-package … … 31 42 (package-install 'use-package)) 32 43 33 (eval-when-compile 34 (require 'use-package)) 44 ;;(eval-when-compile 45 (require 'use-package) 46 47 (quelpa 48 '(quelpa-use-package 49 :fetcher git 50 :url "https://github.com/quelpa/quelpa-use-package.git")) 51 (require 'quelpa-use-package) 35 52 36 53 (use-package use-package-ensure-system-package … … 51 68 ;; Org File 52 69 (org-babel-load-file "~/.emacs-config.org") 70 71 (provide '.emacs) 72 ;;; .emacs ends here -
emacs/.emacs-config.org
rbc317cb r0d64484 1 1 * Meta 2 2 ** Обо мне 3 #+BEGIN_SRC emacs-lisp3 #+BEGIN_SRC emacs-lisp 4 4 ;; Information about me 5 5 (setq user-full-name "Mikhail Kirillov" 6 6 user-mail-address "w96k@posteo.net") 7 #+END_SRC7 #+END_SRC 8 8 * Внешний вид 9 9 ** Назначение шрифта и лигатур 10 А также отступа между строк11 #+BEGIN_SRC emacs-lisp10 А также отступа между строк 11 #+BEGIN_SRC emacs-lisp 12 12 ;;; Set font 13 13 (add-to-list 'default-frame-alist '(font . "Fira Code-10.5")) … … 20 20 21 21 (global-prettify-symbols-mode) 22 #+END_SRC22 #+END_SRC 23 23 ** Назначение темы 24 Вы ее в видите в блоках кода25 #+BEGIN_SRC emacs-lisp24 Вы ее в видите в блоках кода 25 #+BEGIN_SRC emacs-lisp 26 26 ;;; Load a theme 27 27 ;;; https://emacsthemes.com/themes/sanityinc-tomorrow-themes.html … … 29 29 :ensure 30 30 :config (load-theme 'sanityinc-tomorrow-eighties t)) 31 #+END_SRC31 #+END_SRC 32 32 33 33 ** Отображение номера строк 34 #+BEGIN_SRC emacs-lisp34 #+BEGIN_SRC emacs-lisp 35 35 ;;; Отображение номера строки ненужно из-за наличия avy-jump 36 36 ;; (use-package display-line-numbers … … 38 38 ;; (setq display-line-numbers-type 'relative) 39 39 ;; (global-display-line-numbers-mode)) 40 #+END_SRC40 #+END_SRC 41 41 ** Мод-лайн 42 #+BEGIN_SRC emacs-lisp42 #+BEGIN_SRC emacs-lisp 43 43 (custom-set-faces 44 '(mode-line ((t (:background "#333" :foreground "#cccccc" :box (:line-width 1 :color "#2d2d2d" :style released-button) :weight bold :height 1.0 :family "Fira Code"))))) 45 #+END_SRC 44 '(mode-line ((t (:background "#333" 45 :foreground "#cccccc" 46 :box (:line-width 1 47 :color "#2d2d2d" 48 :style released-button) 49 :weight bold 50 :height 1.0 51 :family "Fira Code"))))) 52 #+END_SRC 46 53 ** Подсвечивать текущую строку 47 #+BEGIN_SRC emacs-lisp54 #+BEGIN_SRC emacs-lisp 48 55 ;;; Display current line 49 56 (when (display-graphic-p) 50 57 (global-hl-line-mode)) 51 #+END_SRC58 #+END_SRC 52 59 ** Эмодзи (для telega.el) 53 #+BEGIN_SRC emacs-lisp60 #+BEGIN_SRC emacs-lisp 54 61 (use-package emojify 55 62 :config 56 (global-emojify-mode)) 57 #+END_SRC 63 (global-emojify-mode) 64 (global-emojify-mode-line-mode)) 65 #+END_SRC 58 66 59 67 * Редактирование кода в общем 60 ** Линтер Flymake [built-in] 61 #+BEGIN_SRC emacs-lisp 62 ;; Live-checking text 63 (use-package flymake) 64 65 (global-flycheck-mode) 66 #+END_SRC 68 ** Файловый менеджер 69 #+BEGIN_SRC emacs-lisp 70 (require 'dired) 71 (setq dired-async-mode t) 72 73 ;; Show files in kilobytes 74 (setq dired-listing-switches "-alh") 75 76 (defun xah-dired-sort () 77 "Sort dired dir listing in different ways. 78 Prompt for a choice. 79 URL `http://ergoemacs.org/emacs/dired_sort.html' 80 Version 2018-12-23" 81 (interactive) 82 (let ($sort-by $arg) 83 (setq $sort-by (ido-completing-read "Sort by:" '( "date" "size" "name" ))) 84 (cond 85 ((equal $sort-by "name") (setq $arg "-Al ")) 86 ((equal $sort-by "date") (setq $arg "-Al -t")) 87 ((equal $sort-by "size") (setq $arg "-Al -S")) 88 ;; ((equal $sort-by "dir") (setq $arg "-Al --group-directories-first")) 89 (t (error "logic error 09535" ))) 90 (dired-sort-other $arg ))) 91 92 (define-key dired-mode-map (kbd "s") 'xah-dired-sort) 93 #+END_SRC 94 ** Линтер 95 #+BEGIN_SRC emacs-lisp 96 ;; Live-checking text 97 ;; (use-package flymake 98 ;; :hook (prog-mode . flymake-mode)) 99 100 (use-package flycheck 101 :config 102 (global-flycheck-mode)) 103 #+END_SRC 67 104 ** Дерево отмен 68 #+BEGIN_SRC emacs-lisp105 #+BEGIN_SRC emacs-lisp 69 106 ;;; Undo system 70 107 (use-package undo-tree 71 108 :diminish 72 109 :config (global-undo-tree-mode)) 73 #+END_SRC 74 110 #+END_SRC 111 112 ** Дерево проекта 113 #+BEGIN_SRC emacs-lisp 114 (use-package treemacs 115 :ensure) 116 117 (use-package lsp-treemacs 118 :ensure 119 :config 120 (lsp-treemacs-sync-mode 1)) 121 #+END_SRC 75 122 ** Автоформатирование 76 #+BEGIN_SRC emacs-lisp123 #+BEGIN_SRC emacs-lisp 77 124 ;;; Autoformatting code 78 125 (use-package aggressive-indent 79 126 :ensure t 80 127 :config (global-aggressive-indent-mode)) 81 #+END_SRC128 #+END_SRC 82 129 ** SSH 83 #+BEGIN_SRC emacs-lisp130 #+BEGIN_SRC emacs-lisp 84 131 (use-package ssh-agency 85 132 :ensure) 86 133 (use-package pass 87 134 :ensure) 88 #+END_SRC135 #+END_SRC 89 136 ** Система контроля версий 90 137 Я использую встроенный модуль VC 91 138 (VC > Magit) 92 139 *** Пометки о модифицированных строках 93 94 95 96 97 #+BEGIN_SRC emacs-lisp140 Если строка добавлена, удалена или отредактирована относительно 141 текущего git проекта, то строка помечается зеленым, красным или 142 желтым цветом соответственно. 143 144 #+BEGIN_SRC emacs-lisp 98 145 ;;; Show added & removed git lines 99 146 (use-package git-gutter+ 100 147 :ensure t 148 :diminish 101 149 :config 102 150 (global-git-gutter+-mode) … … 120 168 (define-key git-gutter+-mode-map (kbd "C-x C") 'git-gutter+-stage-and-commit) 121 169 (define-key git-gutter+-mode-map (kbd "C-x C-y") 'git-gutter+-stage-and-commit-whole-buffer) 122 (define-key git-gutter+-mode-map (kbd "C-x U") 'git-gutter+-unstage-whole-buffer)) 123 :diminish (git-gutter+-mode . "gg")) 124 #+END_SRC 170 (define-key git-gutter+-mode-map (kbd "C-x U") 'git-gutter+-unstage-whole-buffer))) 171 #+END_SRC 125 172 ** Буфер обмена 126 #+BEGIN_SRC emacs-lisp173 #+BEGIN_SRC emacs-lisp 127 174 (use-package browse-kill-ring 128 175 :ensure 129 176 :config (browse-kill-ring-default-keybindings)) 130 #+END_SRC177 #+END_SRC 131 178 ** Прыжки 132 #+BEGIN_SRC emacs-lisp179 #+BEGIN_SRC emacs-lisp 133 180 (use-package avy 134 181 :config 135 182 (define-key global-map (kbd "C-c s") 'avy-goto-char) 136 183 (define-key global-map (kbd "C-c l") 'avy-goto-line)) 137 #+END_SRC 184 185 (use-package ace-jump-mode 186 :config 187 (global-set-key (kbd "M-o") 'ace-window)) 188 #+END_SRC 189 ** Сниппеты 190 #+BEGIN_SRC emacs-lisp 191 (use-package yasnippet 192 :config (yas-global-mode)) 193 #+END_SRC 138 194 ** Поиск (ivy + swiper + councel) 139 #+BEGIN_SRC emacs-lisp 140 (use-package swiper 141 :ensure t) 142 #+END_SRC 143 144 #+BEGIN_SRC emacs-lisp 145 (use-package counsel 146 :ensure t) 147 #+END_SRC 148 149 #+BEGIN_SRC emacs-lisp 195 #+BEGIN_SRC emacs-lisp 150 196 (use-package ivy 151 197 :diminish … … 156 202 (global-set-key (kbd "C-c C-r") 'ivy-resume) 157 203 (global-set-key (kbd "<f6>") 'ivy-resume) 158 (global-set-key (kbd "M-x") 'counsel-M-x) 159 (global-set-key (kbd "C-x C-f") 'counsel-find-file) 160 (global-set-key (kbd "<f1> f") 'counsel-describe-function) 161 (global-set-key (kbd "<f1> v") 'counsel-describe-variable) 162 (global-set-key (kbd "<f1> l") 'counsel-find-library) 163 (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol) 164 (global-set-key (kbd "<f2> u") 'counsel-unicode-char) 165 (global-set-key (kbd "C-c g") 'counsel-git) 166 (global-set-key (kbd "C-c j") 'counsel-git-grep) 167 (global-set-key (kbd "C-c k") 'counsel-ag) 168 (global-set-key (kbd "C-x l") 'counsel-locate) 169 (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) 204 ;;(global-set-key (kbd "M-x") 'counsel-M-x) 170 205 (define-key minibuffer-local-map (kbd "C-r") 171 206 'counsel-minibuffer-history) 172 207 (ivy-mode 1)) 173 #+END_SRC208 #+END_SRC 174 209 ** Автодополнение 175 #+BEGIN_SRC emacs-lisp210 #+BEGIN_SRC emacs-lisp 176 211 (use-package pos-tip 177 212 :ensure t) … … 192 227 :after company pos-tip 193 228 :config (company-quickhelp-mode)) 194 #+END_SRC229 #+END_SRC 195 230 ** Проекты 196 #+BEGIN_SRC emacs-lisp231 #+BEGIN_SRC emacs-lisp 197 232 ;;; Project Management 198 233 (use-package projectile … … 202 237 :config 203 238 (projectile-global-mode)) 204 #+END_SRC239 #+END_SRC 205 240 ** Переход к определению 206 #+BEGIN_SRC emacs-lisp241 #+BEGIN_SRC emacs-lisp 207 242 ;;; Jump to defenition 208 243 (use-package dumb-jump … … 212 247 ("M-g x" . dumb-jump-go-prefer-external) 213 248 ("M-g z" . dumb-jump-go-prefer-external-other-window))) 214 #+END_SRC249 #+END_SRC 215 250 216 251 ** Ширина строки -- 80 символов 217 #+BEGIN_SRC emacs-lisp252 #+BEGIN_SRC emacs-lisp 218 253 ;;; 80 column width limit highlighter 219 254 (use-package column-enforce-mode … … 222 257 :config 223 258 (80-column-rule)) 224 #+END_SRC259 #+END_SRC 225 260 ** Подсвечивание парных скобок 226 #+BEGIN_SRC emacs-lisp261 #+BEGIN_SRC emacs-lisp 227 262 ;;; Show pair for a parenthesis 228 263 (show-paren-mode) 229 #+END_SRC264 #+END_SRC 230 265 231 266 ** Ввод парных скобок и кавычек 232 #+BEGIN_SRC emacs-lisp267 #+BEGIN_SRC emacs-lisp 233 268 ;;; Input of pair delimiters 234 (electric-pair-mode)235 #+END_SRC269 ;;(electric-pair-mode) 270 #+END_SRC 236 271 237 272 ** Изменённое поведение биндов C-a и C-e 238 #+BEGIN_SRC emacs-lisp273 #+BEGIN_SRC emacs-lisp 239 274 ;;; Change Move to end & beginning of the line behavior 240 275 (use-package mwim … … 243 278 (global-set-key (kbd "C-a") 'mwim-beginning) 244 279 (global-set-key (kbd "C-e") 'mwim-end)) 245 #+END_SRC280 #+END_SRC 246 281 ** Удаление лишних пробелов при сохранении 247 #+BEGIN_SRC emacs-lisp282 #+BEGIN_SRC emacs-lisp 248 283 ;;; Delete trailing whitespace on save 249 284 (use-package whitespace-cleanup-mode 250 285 :diminish 251 286 :config (global-whitespace-cleanup-mode)) 252 #+END_SRC287 #+END_SRC 253 288 ** EditorConfig 254 #+BEGIN_SRC emacs-lisp289 #+BEGIN_SRC emacs-lisp 255 290 ;;; Editor Config support 256 291 (use-package editorconfig … … 258 293 :config 259 294 (editorconfig-mode 1)) 260 #+END_SRC295 #+END_SRC 261 296 ** Редактирование суперпользователем 262 #+BEGIN_SRC emacs-lisp297 #+BEGIN_SRC emacs-lisp 263 298 ;;; Edit with root user 264 299 (use-package sudo-edit) 265 #+END_SRC300 #+END_SRC 266 301 * Языки программирования 302 ** LSP (автодополнение для языков) и DAP (дебаг) 303 #+BEGIN_SRC emacs-lisp 304 (use-package lsp-mode 305 :hook (scala-mode . lsp) 306 (lsp-mode . lsp-enable-which-key-integration) 307 (lsp-mode . lsp-lens-mode) 308 :config (setq lsp-prefer-flymake nil)) 309 310 (use-package company-lsp 311 :config (push 'company-lsp company-backends)) 312 313 ;;(use-package lsp-metals) 314 315 (use-package lsp-ui) 316 317 (use-package lsp-ivy) 318 319 (use-package company-lsp) 320 321 (use-package posframe 322 :ensure) 323 324 (use-package dap-mode 325 :ensure 326 :hook 327 (lsp-mode . dap-mode) 328 (lsp-mode . dap-ui-mode)) 329 330 (use-package lsp-java 331 :ensure 332 :hook (java-mode . lsp-mode)) 333 334 ;; (use-package dap-java 335 ;; :ensure nil) 336 #+END_SRC 267 337 ** LISP 268 338 *** Разукрашивание скобок в лиспах 269 #+BEGIN_SRC emacs-lisp339 #+BEGIN_SRC emacs-lisp 270 340 ;;; Color parens 271 341 (use-package rainbow-delimiters 272 342 :hook ((prog-mode . rainbow-delimiters-mode))) 273 #+END_SRC343 #+END_SRC 274 344 275 345 *** Редактирование скобок 276 #+BEGIN_SRC emacs-lisp346 #+BEGIN_SRC emacs-lisp 277 347 ;;; Parens editing 278 348 (use-package paredit) 279 #+END_SRC349 #+END_SRC 280 350 *** Автокомлпит Scheme 281 #+BEGIN_SRC emacs-lisp351 #+BEGIN_SRC emacs-lisp 282 352 (use-package scheme-complete 283 353 :after company) 284 #+END_SRC354 #+END_SRC 285 355 *** REPL Scheme 286 #+BEGIN_SRC emacs-lisp356 #+BEGIN_SRC emacs-lisp 287 357 (use-package geiser) 288 #+END_SRC358 #+END_SRC 289 359 ** Python 290 360 *** Elpy 291 #+BEGIN_SRC emacs-lisp361 #+BEGIN_SRC emacs-lisp 292 362 ;; (use-package elpy 293 363 ;; :ensure t … … 303 373 ;; ("C-c p" . elpy-autopep8-fix-code) 304 374 ;; ("C-c b" . elpy-black-fix-code)) 305 #+END_SRC375 #+END_SRC 306 376 *** Anaconda 307 #+BEGIN_SRC emacs-lisp377 #+BEGIN_SRC emacs-lisp 308 378 ;; (use-package anaconda-mode 309 379 ;; :ensure 310 380 ;; :hook (python-mode . anaconda-mode) 311 381 ;; (python-mode . anaconda-eldoc-mode)) 312 #+END_SRC382 #+END_SRC 313 383 *** Jinja2 314 #+BEGIN_SRC emacs-lisp384 #+BEGIN_SRC emacs-lisp 315 385 (use-package jinja2-mode 316 386 :ensure t) 317 #+END_SRC387 #+END_SRC 318 388 *** Автодополнение 319 #+BEGIN_SRC emacs-lisp389 #+BEGIN_SRC emacs-lisp 320 390 ;; (use-package company-anaconda 321 391 ;; :ensure … … 323 393 ;; :config 324 394 ;; (add-to-list 'company-backends '(company-anaconda :with company-capf))) 325 #+END_SRC395 #+END_SRC 326 396 *** Документация 327 #+BEGIN_SRC emacs-lisp397 #+BEGIN_SRC emacs-lisp 328 398 ;;; Access python documentation 329 399 (use-package pydoc 330 400 :commands pydoc 331 401 :config (setq pydoc-command "python3 -m pydoc")) 332 #+END_SRC402 #+END_SRC 333 403 ** Javascript 334 404 *** Основной мод 335 #+BEGIN_SRC emacs-lisp405 #+BEGIN_SRC emacs-lisp 336 406 ;;; Javascript 337 407 (use-package js2-mode … … 347 417 (define-key js-mode-map (kbd "C-c C-l") 'nodejs-repl-load-file) 348 418 (define-key js-mode-map (kbd "C-c C-z") 'nodejs-repl-switch-to-repl)))) 349 #+END_SRC419 #+END_SRC 350 420 *** Node.js REPL 351 #+BEGIN_SRC emacs-lisp421 #+BEGIN_SRC emacs-lisp 352 422 ;;; Node.js Repl 353 423 (use-package nodejs-repl) 354 #+END_SRC424 #+END_SRC 355 425 *** Typescript 356 #+BEGIN_SRC emacs-lisp426 #+BEGIN_SRC emacs-lisp 357 427 ;;; Typescript support 358 428 (use-package typescript-mode) 359 #+END_SRC429 #+END_SRC 360 430 *** Vue.js 361 #+BEGIN_SRC emacs-lisp431 #+BEGIN_SRC emacs-lisp 362 432 ;;; Vue 363 433 (use-package vue-mode 364 434 :ensure 365 435 :config (setq mmm-submode-decoration-level 0)) 366 #+END_SRC 436 #+END_SRC 437 ** Scala 438 *** REPL 439 #+BEGIN_SRC emacs-lisp 440 ;; (use-package ammonite-term-repl 441 ;; :ensure 442 ;; :hook (scala-mode . ammonite-term-repl-minor-mode)) 443 #+END_SRC 444 *** Scala-mode 445 #+BEGIN_SRC emacs-lisp 446 (use-package scala-mode 447 :ensure 448 :mode "\\.s\\(cala\\|bt\\)$") 449 #+END_SRC 450 *** Sbt-mode 451 #+BEGIN_SRC emacs-lisp 452 (use-package sbt-mode 453 :ensure 454 :commands sbt-start sbt-command 455 :config 456 ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31 457 ;; allows using SPACE when in the minibuffer 458 (substitute-key-definition 459 'minibuffer-complete-word 460 'self-insert-command 461 minibuffer-local-completion-map) 462 ;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152 463 (setq sbt:program-options '("-Dsbt.supershell=false"))) 464 #+END_SRC 367 465 ** Haskell 368 466 *** Основной мод 369 #+BEGIN_SRC emacs-lisp467 #+BEGIN_SRC emacs-lisp 370 468 ;;; Haskell 371 469 (use-package haskell-mode) 372 #+END_SRC470 #+END_SRC 373 471 *** Окружение разработки 374 #+BEGIN_SRC emacs-lisp472 #+BEGIN_SRC emacs-lisp 375 473 ;;; Haskell support 376 474 (use-package intero … … 378 476 :after haskell-mode 379 477 :config (add-hook 'haskell-mode-hook 'intero-mode)) 380 #+END_SRC478 #+END_SRC 381 479 ** Лиспы в целом 382 480 *** Lispy 383 #+BEGIN_SRC elisp481 #+BEGIN_SRC elisp 384 482 (use-package lispy) 385 #+END_SRC483 #+END_SRC 386 484 *** Parinfer 387 #+BEGIN_SRC elisp485 #+BEGIN_SRC elisp 388 486 (use-package parinfer 389 487 :after lispy … … 393 491 (progn 394 492 (setq parinfer-extensions 395 '(defaults ; should be included.396 pretty-parens ; different paren styles for different modes.397 lispy ; If you use Lispy. With this extension, you should install Lispy and do not enable lispy-mode directly.398 paredit ; Introduce some paredit commands.399 smart-tab ; C-b & C-f jump positions and smart shift with tab & S-tab.400 smart-yank)) ; Yank behavior depend on mode.493 '(defaults 494 pretty-parens 495 lispy 496 paredit 497 smart-tab 498 smart-yank)) 401 499 (add-hook 'clojure-mode-hook #'parinfer-mode) 402 500 (add-hook 'emacs-lisp-mode-hook #'parinfer-mode) … … 404 502 (add-hook 'scheme-mode-hook #'parinfer-mode) 405 503 (add-hook 'lisp-mode-hook #'parinfer-mode))) 406 #+END_SRC504 #+END_SRC 407 505 ** Clojure 408 506 *** Mode 409 #+BEGIN_SRC elisp507 #+BEGIN_SRC elisp 410 508 (use-package clojure-mode) 411 #+END_SRC509 #+END_SRC 412 510 *** REPL 413 #+BEGIN_SRC emacs-lisp511 #+BEGIN_SRC emacs-lisp 414 512 ;;; Clojure REPL 415 513 (use-package cider) 416 #+END_SRC514 #+END_SRC 417 515 *** Рефакторинг 418 #+BEGIN_SRC elisp516 #+BEGIN_SRC elisp 419 517 (use-package clj-refactor 420 518 :ensure t … … 422 520 :config 423 521 ((cljr-add-keybindings-with-prefix "C-c C-m"))) 424 #+END_SRC522 #+END_SRC 425 523 ** Common Lisp 426 524 *** REPL 427 #+BEGIN_SRC emacs-lisp525 #+BEGIN_SRC emacs-lisp 428 526 (use-package slime 429 527 :config 430 528 431 529 (setq slime-contribs '(slime-fancy slime-repl slime-banner))) 432 #+END_SRC530 #+END_SRC 433 531 ** Fennel 434 #+BEGIN_SRC emacs-lisp532 #+BEGIN_SRC emacs-lisp 435 533 (use-package fennel-mode 436 534 :ensure … … 443 541 (format "(lume.hotswap \"%s\")\n" 444 542 (substring (file-name-nondirectory (buffer-file-name)) 0 -4)))))) 445 #+END_SRC543 #+END_SRC 446 544 * Языки декларирования 447 545 ** SQL 448 #+BEGIN_SRC emacs-lisp546 #+BEGIN_SRC emacs-lisp 449 547 450 548 (use-package emacsql) 451 #+END_SRC549 #+END_SRC 452 550 ** Веб шаблоны 453 551 *** Web-mode 454 #+BEGIN_SRC emacs-lisp552 #+BEGIN_SRC emacs-lisp 455 553 ;;; Templates 456 554 (use-package web-mode … … 461 559 (setq web-mode-enable-current-element-highlight t) 462 560 (setq web-mode-enable-current-column-highlight t)) 463 #+END_SRC561 #+END_SRC 464 562 ** Org-mode 465 #+BEGIN_SRC emacs-lisp563 #+BEGIN_SRC emacs-lisp 466 564 ;;; org 467 565 (use-package org … … 472 570 (global-set-key (kbd "C-c c") 'org-capture) 473 571 474 (setq org-capture-templates475 (quote (("t" "todo" entry (file "~/git/org/refile.org")476 "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)477 ("r" "respond" entry (file "~/git/org/refile.org")478 "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t)479 ("n" "note" entry (file "~/git/org/refile.org")480 "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t)481 ("j" "Journal" entry (file+datetree "~/git/org/diary.org")482 "* %?\n%U\n" :clock-in t :clock-resume t)483 ("w" "org-protocol" entry (file "~/git/org/refile.org")484 "* TODO Review %c\n%U\n" :immediate-finish t)485 ("m" "Meeting" entry (file "~/git/org/refile.org")486 "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t)487 ("p" "Phone call" entry (file "~/git/org/refile.org")488 "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t)489 ("h" "Habit" entry (file "~/git/org/refile.org")490 "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"))))491 492 (setq org-modules (quote (org-bbdb493 org-bibtex494 org-crypt495 org-gnus496 org-id497 org-info498 org-habit499 org-inlinetask500 org-irc501 org-mhe502 org-protocol503 org-w3m)))504 572 (setq org-todo-keywords 505 573 (quote ((sequence "TODO(t)" "MIGRATE(m)" "|" "DONE(d)") … … 514 582 ("MEETING" :foreground "forest cyan" :weight bold) 515 583 ("PHONE" :foreground "blue" :weight bold))))) 516 #+END_SRC584 #+END_SRC 517 585 *** Пункты списка для org-mode 518 #+BEGIN_SRC emacs-lisp586 #+BEGIN_SRC emacs-lisp 519 587 ;;; Bullets for org-mode 520 588 (use-package org-bullets 521 589 :commands org-bullets-mode 522 590 :hook (org-mode . org-bullets-mode)) 523 #+END_SRC591 #+END_SRC 524 592 *** Агенда 525 #+BEGIN_SRC emacs-lisp593 #+BEGIN_SRC emacs-lisp 526 594 ;;; Org-mode Setup 527 595 (setq org-agenda-files (list 528 596 "~/Documents/life.org")) 529 #+END_SRC597 #+END_SRC 530 598 *** Техника pomodoro 531 #+BEGIN_SRC emacs-lisp599 #+BEGIN_SRC emacs-lisp 532 600 ;;; Pomodoro technique tracking for org-mode 533 601 (use-package org-pomodoro) 534 #+END_SRC602 #+END_SRC 535 603 *** Ведение журнала 536 #+BEGIN_SRC emacs-lisp604 #+BEGIN_SRC emacs-lisp 537 605 ;;; Journal 538 606 (use-package org-journal 539 607 :ensure) 540 #+END_SRC608 #+END_SRC 541 609 *** Презентации 542 #+BEGIN_SRC emacs-lisp610 #+BEGIN_SRC emacs-lisp 543 611 ;;; Presentation 544 612 (use-package epresent 545 613 :ensure t) 546 #+END_SRC614 #+END_SRC 547 615 ** Markdown 548 616 *** Превью 549 #+BEGIN_SRC emacs-lisp617 #+BEGIN_SRC emacs-lisp 550 618 ;;; Markdown preview 551 619 (use-package flymd 552 620 :ensure) 553 #+END_SRC621 #+END_SRC 554 622 ** Lilypond 555 #+BEGIN_SRC emacs-lisp623 #+BEGIN_SRC emacs-lisp 556 624 ;;; Lilypond 557 625 (progn … … 566 634 :ensure 567 635 :after flycheck) 568 #+END_SRC636 #+END_SRC 569 637 * Коммуникации 570 638 *** IRC 571 #+BEGIN_SRC emacs-lisp639 #+BEGIN_SRC emacs-lisp 572 640 ;;; IRC 573 641 (use-package erc 574 642 :ensure) 575 #+END_SRC643 #+END_SRC 576 644 *** Telegram 577 #+BEGIN_SRC emacs-lisp645 #+BEGIN_SRC emacs-lisp 578 646 ;;; Telegram client 579 647 (use-package telega 580 648 :config 581 649 (telega-mode-line-mode 1) 582 (setq telega-chat-fill-column 60)) 583 #+END_SRC 650 (setq telega-chat-fill-column 60) 651 (setq telega-sticker-size '(8 . 32)) 652 (setq telega-animation-height 8) 653 (setq telega-video-note-height 8) 654 (setq telega-user-use-avatars t) 655 (setq telega-root-show-avatars t)) 656 #+END_SRC 584 657 *** Email 585 658 **** Конвертирование org в html 586 #+BEGIN_SRC emacs-lisp659 #+BEGIN_SRC emacs-lisp 587 660 ;;; convert org to html in gnus 588 661 (use-package org-mime 589 662 :ensure) 590 #+END_SRC663 #+END_SRC 591 664 *** GNUPG 592 665 **** Ввод ключей 593 #+BEGIN_SRC emacs-lisp666 #+BEGIN_SRC emacs-lisp 594 667 ;;; Dialog program for entering password 595 668 (use-package pinentry … … 597 670 (setq epa-pinentry-mode 'loopback) 598 671 (pinentry-start)) 599 #+END_SRC672 #+END_SRC 600 673 * Разное 601 674 ** Минорные твики дефолтного имакса 602 675 *** Улучшение производительности в больших файлах 603 #+BEGIN_SRC emacs-lisp604 (use-package so-long605 :config (global-so-long-mode 1))606 #+END_SRC676 #+BEGIN_SRC emacs-lisp 677 ;; (use-package so-long 678 ;; :config (global-so-long-mode 0)) 679 #+END_SRC 607 680 *** Скрыть бары и скролл 608 #+BEGIN_SRC emacs-lisp 609 ;;; Disable emacs gui 610 (menu-bar-mode -1) 611 (scroll-bar-mode -1) 612 (tool-bar-mode -1) 613 (tooltip-mode -1) 614 #+END_SRC 681 #+BEGIN_SRC emacs-lisp 682 ;;; Disable emacs gui 683 (menu-bar-mode -1) 684 (scroll-bar-mode -1) 685 (tool-bar-mode -1) 686 (tooltip-mode t) 687 (setq use-dialog-box nil) 688 (setq redisplay-dont-pause t) 689 #+END_SRC 615 690 *** Не спрашивать о несуществующих буферах 616 #+BEGIN_SRC emacs-lisp691 #+BEGIN_SRC emacs-lisp 617 692 (setq-default confirm-nonexistent-file-or-buffer t) 618 #+END_SRC693 #+END_SRC 619 694 *** Спрашивать покороче 620 695 Не спрашивать yes/no, вместо этого спрашивать y/n 621 #+BEGIN_SRC emacs-lisp696 #+BEGIN_SRC emacs-lisp 622 697 ;;; Short messages 623 698 (defalias 'yes-or-no-p 'y-or-n-p) 624 #+END_SRC699 #+END_SRC 625 700 *** Сохранение позиции курсора 626 #+BEGIN_SRC emacs-lisp701 #+BEGIN_SRC emacs-lisp 627 702 (setq 628 703 save-place-forget-unreadable-files t … … 630 705 631 706 (save-place-mode 1) 632 #+END_SRC707 #+END_SRC 633 708 *** Мигающий курсор 634 #+BEGIN_SRC emacs-lisp709 #+BEGIN_SRC emacs-lisp 635 710 (blink-cursor-mode 1) 636 #+END_SRC711 #+END_SRC 637 712 *** Переменная PATH в eshell 638 #+BEGIN_SRC emacs-lisp713 #+BEGIN_SRC emacs-lisp 639 714 (use-package exec-path-from-shell 640 715 :config … … 642 717 (exec-path-from-shell-initialize) 643 718 (exec-path-from-shell-copy-env "PATH"))) 644 #+END_SRC719 #+END_SRC 645 720 *** Не создавать лишних файлов 646 #+BEGIN_SRC emacs-lisp721 #+BEGIN_SRC emacs-lisp 647 722 (setq create-lockfiles nil 648 723 make-backup-files nil ; disable backup files 649 724 auto-save-list-file-name nil ; disable .saves files 650 725 auto-save-default nil) ; disable auto saving 651 #+END_SRC726 #+END_SRC 652 727 *** Отображение номера колонки 653 #+BEGIN_SRC emacs-lisp728 #+BEGIN_SRC emacs-lisp 654 729 (column-number-mode) 655 #+END_SRC 730 #+END_SRC 731 *** Убить буфер 732 #+BEGIN_SRC emacs-lisp 733 (substitute-key-definition 'kill-buffer 'kill-buffer-and-window global-map) 734 #+END_SRC 735 *** Аутлайн для лиспа на основе уровней комментов 736 #+BEGIN_SRC emacs-lisp 737 (use-package outshine 738 :hook (emacs-lisp-mode-hook . outshine-mode)) 739 #+END_SRC 740 ** Полный экран 741 #+BEGIN_SRC emacs-lisp 742 (use-package maxframe 743 :ensure 744 :hook (window-setup-hook . maximize-frame)) 745 #+END_SRC 656 746 ** Which-key 657 #+BEGIN_SRC emacs-lisp747 #+BEGIN_SRC emacs-lisp 658 748 (use-package which-key 749 :diminish 659 750 :config 660 751 (setq which-key-show-early-on-C-h t) … … 665 756 (setq which-key-sort-order 'which-key-prefix-then-key-order) 666 757 (which-key-mode)) 667 #+END_SRC758 #+END_SRC 668 759 ** Системные пакеты 669 760 *** Docker 670 #+BEGIN_SRC emacs-lisp761 #+BEGIN_SRC emacs-lisp 671 762 ;;; Manage docker in emacs 672 763 (use-package docker 673 764 :ensure-system-package docker 674 765 :bind ("C-c d" . docker)) 675 #+END_SRC766 #+END_SRC 676 767 *** EMMS 677 #+BEGIN_SRC emacs-lisp768 #+BEGIN_SRC emacs-lisp 678 769 (use-package emms 679 770 :config … … 683 774 (setq emms-player-list '(emms-player-mpg321 emms-player-ogg123 684 775 emms-player-mplayer))) 685 #+END_SRC776 #+END_SRC 686 777 ** Баг-трекеры 687 778 *** Debbugs 688 #+BEGIN_SRC emacs-lisp779 #+BEGIN_SRC emacs-lisp 689 780 ;;; Bug-Tracker DebBugs 690 781 (use-package debbugs) 691 #+END_SRC782 #+END_SRC 692 783 ** Демонстрация нажатий и команд 693 #+BEGIN_SRC emacs-lisp784 #+BEGIN_SRC emacs-lisp 694 785 (use-package keycast 695 786 :ensure) 696 #+END_SRC787 #+END_SRC 697 788 ** HTTP сервер 698 #+BEGIN_SRC emacs-lisp789 #+BEGIN_SRC emacs-lisp 699 790 ;;; HTTP server 700 791 (use-package simple-httpd) 701 #+END_SRC792 #+END_SRC 702 793 703 794 ** REST клиент 704 #+BEGIN_SRC emacs-lisp795 #+BEGIN_SRC emacs-lisp 705 796 ;;; Rest client 706 797 (use-package restclient) 707 #+END_SRC798 #+END_SRC 708 799 ** PDF 709 #+BEGIN_SRC emacs-lisp800 #+BEGIN_SRC emacs-lisp 710 801 ;;; PDF Tools 711 802 (use-package pdf-tools … … 713 804 :config 714 805 (pdf-loader-install)) 715 #+END_SRC806 #+END_SRC 716 807 ** Показать пробелы 717 #+BEGIN_SRC emacs-lisp808 #+BEGIN_SRC emacs-lisp 718 809 (use-package whitespace 719 810 :config (global-set-key (kbd "C-c w") 'whitespace-mode)) 720 #+END_SRC811 #+END_SRC 721 812 ** Управление финансами 722 #+BEGIN_SRC emacs-lisp813 #+BEGIN_SRC emacs-lisp 723 814 ;;; Accounting 724 815 (use-package ledger-mode) 725 #+END_SRC816 #+END_SRC 726 817 ** Скрытие минорных модов 727 #+BEGIN_SRC emacs-lisp818 #+BEGIN_SRC emacs-lisp 728 819 ;;; hide some minor modes 729 820 (use-package diminish) 730 #+END_SRC821 #+END_SRC 731 822 ** Автосохранение в /tmp 732 #+BEGIN_SRC emacs-lisp823 #+BEGIN_SRC emacs-lisp 733 824 (setq backup-directory-alist 734 825 `((".*" . ,temporary-file-directory))) 735 826 (setq auto-save-file-name-transforms 736 827 `((".*" ,temporary-file-directory t))) 737 #+END_SRC828 #+END_SRC 738 829 ** Увеличение/уменьшение шрифта 739 #+BEGIN_SRC emacs-lisp830 #+BEGIN_SRC emacs-lisp 740 831 (defun zoom-in () 741 832 (interactive) … … 752 843 (define-key global-map (kbd "C-1") 'zoom-in) 753 844 (define-key global-map (kbd "C-0") 'zoom-out) 754 #+END_SRC845 #+END_SRC 755 846 ** Отключить бипы 756 #+BEGIN_SRC emacs-lisp847 #+BEGIN_SRC emacs-lisp 757 848 (setq visible-bell t) 758 #+END_SRC 849 #+END_SRC 850 ** Обнаруживать просадки 851 #+BEGIN_SRC emacs-lisp 852 ;; (use-package explain-pause-mode 853 ;; :quelpa (explain-pause-mode :fetcher github :repo "lastquestion/explain-pause-mode") 854 ;; :diminish 855 ;; :config (setq explain-pause-blocking-too-long-ms 200) 856 ;; (explain-pause-mode)) 857 #+END_SRC -
guix/.bash_profile
rbc317cb r0d64484 1 export PATH=$PATH:~/.bin 2 1 3 # Honor per-interactive-shell startup file 2 4 if [ -f ~/.bashrc ]; then . ~/.bashrc; fi -
guix/.bashrc
rbc317cb r0d64484 6 6 export SHELL 7 7 8 if [[ $- != *i* ]] 9 then 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 8 # if [[ $- != *i* ]] 14 9 15 # Don't do anything else. 16 return 17 fi 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 18 19 19 # Source the system-wide file. … … 23 23 if [ -n "$GUIX_ENVIRONMENT" ] 24 24 then 25 PS1='\033[1;33m\]\w [env] \$ \033[0m'25 export PS1="\w [env] \$" 26 26 else 27 PS1='\033[1;33m\]\w \$ \033[0m'27 export PS1="\[$(tput bold; tput setaf 3;)\]\w \$ \[$(tput sgr0)\]" 28 28 fi 29 29 alias ls='ls -p --color=auto' 30 30 alias ll='ls -l' 31 31 alias grep='grep --color=auto' 32 33 # Welcome message 34 printf "Welcome to bash shell\n\n" 35 36 # THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! 37 export SDKMAN_DIR="/home/w96k/.sdkman" 38 [[ -s "/home/w96k/.sdkman/bin/sdkman-init.sh" ]] && source "/home/w96k/.sdkman/bin/sdkman-init.sh" -
guix/.zshrc
rbc317cb r0d64484 15 15 16 16 #source /run/current-system/profile/etc/profile.d/nix.sh 17 18 #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! 19 export SDKMAN_DIR="/home/w96k/.sdkman" 20 [[ -s "/home/w96k/.sdkman/bin/sdkman-init.sh" ]] && source "/home/w96k/.sdkman/bin/sdkman-init.sh" -
guix/config.scm
rbc317cb r0d64484 26 26 27 27 (use-package-modules 28 28 29 hurd 29 30 geo … … 93 94 94 95 ;; Remove gdm (gdm is default in guix) 95 96 96 (set! %my-services 97 (remove (lambda (service) 97 98 (eq? (service-kind service) gdm-service-type)) 98 99 %my-services)) -
guix/fresh.scm
rbc317cb r0d64484 1 ;; This is an operating system configuration generated2 ;; by the graphical installer.3 4 1 (use-modules (gnu) 5 2 (srfi srfi-1)) 6 3 7 ;;(use-modules (non-gnu packages lua-fennel))8 4 (use-service-modules 9 5 desktop … … 11 7 ssh 12 8 xorg 13 sound14 dbus15 9 nix) 16 (use-package-modules wm lisp bash fonts linux) 10 11 (use-package-modules wm lisp bash) 17 12 18 13 (operating-system … … 26 21 "caps:ctrl_modifier" 27 22 ))) 28 (kernel linux-libre) 29 (kernel-arguments '("processor.max_cstate=1" ; Disable power savings 30 "intel_idle.max_cstate=2" ; (cstate 3-4 provides 31 ; high freq cpu noice) 32 "consoleblank=0" 33 ;;"ahci.mobile_lpm_policy=1" 34 "KVM" 35 ;;"i915.enable_guc=-1" 36 "i915.enable_dc=0" ; Disable cstate for gpu 23 ;; (kernel linux-libre) 24 (kernel-arguments 25 '("processor.max_cstatpe=1" ; Disable power savings 26 "intel_idle.max_cstate=2" ; (cstate 3-4 provides 27 ; high freq cpu noice) 28 "consoleblank=0" 29 ;;"ahci.mobile_lpm_policy=1" 30 "KVM" 31 ;;"i915.enable_guc=-1" 32 ;;"i915.enable_dc=0" ; Disable cstate for gpu 37 33 38 "intremap=off" ; Fix for failed to map dmar2 39 40 "logo.nologo" 41 "loglevel=4" 42 )) 34 "intremap=off" ; Fix for failed to map dmar2 35 36 "logo.nologo" 37 "loglevel=4")) 43 38 (initrd-modules (append '("i915") %base-initrd-modules)) 44 39 (host-name "libreboot-x200t") 45 (users (cons* (user-account 46 (name "w96k") 47 (comment "Mikhail Kirillov") 48 (group "users") 49 (home-directory "/home/w96k") 50 (supplementary-groups 51 '("wheel" "netdev" "audio" "video"))) 52 %base-user-accounts)) 40 (users 41 (cons* 42 (user-account 43 (name "w96k") 44 (comment "Mikhail Kirillov") 45 (group "users") 46 (home-directory "/home/w96k") 47 (supplementary-groups 48 '("wheel" "netdev" "audio" "video" "nixbld"))) 49 %base-user-accounts)) 53 50 (packages 54 51 (append 55 (map specification->package 56 '("ratpoison" 57 "xterm" 58 "stumpwm" 59 "nss-certs" 60 "glibc-utf8-locales" 61 "font-dejavu" 62 "font-terminus" 63 "font-fira-code" 64 "font-fira-mono")) 65 (list sbcl stumpwm `(,stumpwm "lib")) 52 (map 53 specification->package 54 '("ratpoison" 55 "xterm" 56 "stumpwm" 57 "bash" 58 "nss-certs" 59 "glibc-utf8-locales" 60 "font-dejavu" 61 "font-terminus" 62 "font-fira-code" 63 "font-fira-mono" 64 "sbcl" 65 "stumpwm")) 66 (list `(,stumpwm "lib")) 66 67 %base-packages)) 67 68 68 (services (cons* 69 (service openssh-service-type) 70 (service tor-service-type) 69 (services 70 (cons* 71 (service openssh-service-type) 72 (service tor-service-type) 71 73 72 ;;Wacom tablet support 73 (service inputattach-service-type 74 (inputattach-configuration 75 (device "/dev/ttyS4") 76 (device-type "wacom"))) 74 ;;Wacom tablet support 75 (service inputattach-service-type 76 (inputattach-configuration 77 (device "/dev/ttyS4") 78 (device-type "wacom"))) 79 80 (extra-special-file "/bin/bash" 81 (file-append bash "/bin/bash")) 77 82 78 (extra-special-file "/bin/bash" 79 (file-append bash "/bin/bash")) 80 81 ;;(service nix-service-type) 82 (set-xorg-configuration 83 (xorg-configuration 84 (keyboard-layout keyboard-layout))) 85 %desktop-services)) 83 (service nix-service-type) 84 (set-xorg-configuration 85 (xorg-configuration 86 (keyboard-layout keyboard-layout))) 87 %desktop-services)) 86 88 87 89 (bootloader … … 92 94 (swap-devices (list "/dev/sda1")) 93 95 (file-systems 94 (cons* (file-system 95 (mount-point "/") 96 (device 97 (uuid "c184f446-df67-4103-b28e-465ac8776f10" 98 'ext4)) 99 (type "ext4")) 100 (file-system 101 (mount-point "/media/hdd/") 102 (device 103 (uuid "71cb0818-baf3-4f7f-8bc2-7e2b0cca3488" 104 'ext4)) 105 (type "ext4")) 106 107 %base-file-systems))) 96 (cons* 97 (file-system 98 (mount-point "/") 99 (device 100 (uuid "c184f446-df67-4103-b28e-465ac8776f10" 101 'ext4)) 102 (type "ext4")) 103 ;;(file-system 104 ;;(mount-point "/media/hdd/") 105 ;;(device 106 ;; (uuid "71cb0818-baf3-4f7f-8bc2-7e2b0cca3488" 107 ;; 'ext4)) 108 ;; (type "ext4")) 109 110 %base-file-systems))) -
wm/.stumpwmrc
rbc317cb r0d64484 28 28 (print *time-modeline-string*) 29 29 30 (setf *mode-line-pad-x* 830 (setf *mode-line-pad-x* 0 31 31 *mode-line-pad-y* 0 32 32 *mode-line-timeout* 1 … … 45 45 *startup-mode-line* t 46 46 *window-name-source* :class 47 *delim* " ^2::^7 " 48 47 *delim* " ^2::^7 " 49 48 *screen-mode-line-format* (list 50 49 ;; Windows 51 50 ;;"[^4%n^b]" 52 "^7%v ^> ^7"51 "^7%v ^>" 53 52 ;; CPU 54 " %C" *delim*53 "^7%C" *delim* 55 54 ;; RAM 56 55 "%M" *delim*
Note:
See TracChangeset
for help on using the changeset viewer.