You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

743 lines
20 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. #+TITLE: Emacs Configuration
  2. #+AUTHOR: Marc Pohling
  3. Needs debian package ess
  4. #+begin_src R :session *R* :results output graphics :file second.png :exports both
  5. library(ggplot2)
  6. x <- (0:100)/100
  7. y <- x^2
  8. qplot(x,y,geom="line",xlab=expression(x),ylab=expression(f(x)==x^2),
  9. main="Quadratfunktion")
  10. #+end_src
  11. #+RESULTS:
  12. * Personal Information
  13. #+begin_src emacs-lisp
  14. (setq user-full-name "Marc Pohling"
  15. user-mail-address "marc.pohling@googlemail.com")
  16. #+end_src
  17. * Update config in a running config
  18. Two options:
  19. - reload the open file: M-x load-file, then press twice to accept
  20. the default filename, which is the currently opened
  21. - Point at the end of any sexp and press C-x C-e
  22. * Customize settings
  23. Move the customize settings to its own file, instead of saving
  24. customize settings in [[file:init.el][init.el]].
  25. #+begin_src emacs-lisp
  26. (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
  27. (load custom-file)
  28. #+end_src
  29. * Theme
  30. ** Font
  31. #+begin_src emacs-lisp
  32. (set-face-attribute 'default nil :font "Hack-12")
  33. #+end_src
  34. ** Material Theme
  35. The [[https://github.com/cpaulik/emacs-material-theme][Material Theme]] comes in a dark and a light variant. Not too dark
  36. to be strenious though.
  37. #+begin_src emacs-lisp
  38. (use-package material-theme
  39. :if (window-system)
  40. :defer t
  41. :ensure t
  42. ;; :init
  43. ;; (load-theme 'material t)
  44. )
  45. #+end_src
  46. ** Apropospriate Theme
  47. Variants dark and light
  48. #+begin_src emacs-lisp
  49. (use-package apropospriate-theme
  50. :if (window-system)
  51. :defer t
  52. :ensure t
  53. :init
  54. (load-theme 'apropospriate-dark t)
  55. )
  56. #+end_src
  57. * Sane defaults
  58. Sources for this section include [[https://github.com/magnars/.emacs.d/blob/master/settings/sane-defaults.el][Magnars Sveen]] and [[http://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua]]
  59. These functions are useful. Activate them.
  60. #+begin_src emacs-lisp
  61. (put 'downcase-region 'disabled nil)
  62. (put 'upcase-region 'disabled nil)
  63. (put 'narrow-to-region 'disabled nil)
  64. (put 'dired-find-alternate-file 'disabled nil)
  65. #+end_src
  66. Answering just 'y' or 'n' should be enough.
  67. #+begin_src emacs-lisp
  68. (defalias 'yes-or-no-p 'y-or-n-p)
  69. #+end_src
  70. Keep all backup and auto-save files in one directory
  71. #+begin_src emacs-lisp
  72. (setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
  73. (setq auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list/" t)))
  74. #+end_src
  75. UTF-8 please
  76. #+begin_src emacs-lisp
  77. (setq locale-coding-system 'utf-8)
  78. (set-terminal-coding-system 'utf-8)
  79. (set-keyboard-coding-system 'utf-8)
  80. (set-selection-coding-system 'utf-8)
  81. (prefer-coding-system 'utf-8)
  82. #+end_src
  83. Avoid tabs in place of multiple spaces (they look bad in TeX)
  84. and show empty lines
  85. #+begin_src emacs-lisp
  86. (setq-default indent-tabs-mode nil)
  87. (setq-default indicate-empty-lines t)
  88. #+end_src
  89. Turn off blinking cursor
  90. #+begin_src emacs-lisp
  91. (blink-cursor-mode -1)
  92. #+end_src
  93. Don't count two spaces after a period as the end of a sentence.
  94. Just one space is needed
  95. #+begin_src emacs-lisp
  96. (setq sentence-end-double-space nil)
  97. #+end_src
  98. Delete the region when typing, just like as we expect nowadays.
  99. #+begin_src emacs-lisp
  100. (delete-selection-mode t)
  101. #+end_src
  102. Auto-indent when pressing RET, just new-line when C-j
  103. #+begin_src emacs-lisp
  104. (define-key global-map (kbd "RET") 'newline-and-indent)
  105. (define-key global-map (kbd "C-j") 'newline)
  106. #+end_src
  107. Various stuff
  108. #+begin_src emacs-lisp
  109. (show-paren-mode t)
  110. (column-number-mode t)
  111. (global-visual-line-mode)
  112. (diminish 'visual-line-mode)
  113. (setq uniquify-buffer-name-style 'forward)
  114. #+end_src
  115. * List buffers
  116. Ibuffer is the improved version of list-buffers.
  117. Make ibuffer the default buffer lister. [[http://ergoemacs.org/emacs/emacs_buffer_management.html][Source]]
  118. #+begin_src emacs-lisp
  119. (defalias 'list-buffers 'ibuffer)
  120. #+end_src
  121. Also auto refresh dired, but be quiet about it. [[http://whattheemacsd.com/sane-defaults.el-01.html][Source]]
  122. #+begin_src emacs-lisp
  123. (add-hook 'dired-mode-hook 'auto-revert-mode)
  124. (setq global-auto-revert-non-file-buffers t)
  125. (setq auto-revert-verbose nil)
  126. #+end_src
  127. * Org Mode
  128. ** Installation
  129. Although org mode ships with Emacs, the latest version can be installed externally. The configuration here follows the [[http://orgmode.org/elpa.html][Org mode ELPA Installation instructions.]]
  130. Added a hook to complete org functions, company-capf is necessary for this
  131. #+begin_src emacs-lisp
  132. (use-package org
  133. :ensure org-plus-contrib
  134. :init
  135. (add-hook 'org-mode-hook
  136. (lambda ()
  137. (add-to-list 'company-backends 'company-capf)
  138. (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)
  139. (company-mode t)))
  140. )
  141. #+end_src
  142. To avoid problems executing source blocks out of the box. [[https://emacs.stackexchange.com/a/28604][Others have the same problem, too]]. The solution is to remove the .elc files form the package directory:
  143. #+begin_src sh:
  144. var ORG_DIR=(let* ((org-v (cadr (split-string (org-version nil t) "@"))) (len (length org-v))) (substring org-v 1 (- len 2)))
  145. rm ${ORG_DIR}/*.elc
  146. #+end_src
  147. *** Org key bindings
  148. Set up some global key bindings that integrate with Org mode features
  149. #+begin_src emacs-lisp
  150. (bind-key "C-c l" 'org-store-link)
  151. (bind-key "C-c c" 'org-capture)
  152. (bind-key "C-c a" 'org-agenda)
  153. #+end_src
  154. Org overwrites RET and C-j, so I need to disable the rebinds
  155. #+begin_src emacs-lisp
  156. (define-key org-mode-map (kbd "RET") nil) ;;org-return
  157. (define-key org-mode-map (kbd "C-j") nil) ;;org-return-indent
  158. #+end_src
  159. *** Org agenda
  160. For a more detailed example [[https://github.com/sachac/.emacs.d/blob/83d21e473368adb1f63e582a6595450fcd0e787c/Sacha.org#org-agenda][see here]].
  161. #+begin_src emacs-lisp
  162. (setq org-agenda-files
  163. (delq nil
  164. (mapcar (lambda (x) (and (file-exists-p x) x))
  165. '("~/Archiv/Dokumente/Agenda"))
  166. )
  167. )
  168. #+end_src
  169. *** Org capture
  170. #+begin_src emacs-lisp
  171. (bind-key "C-c c" 'org-capture)
  172. (setq org-default-notes-file "~/Archiv/Dokumente/Notizen/notes.org")
  173. #+end_src
  174. ** Org Setup
  175. Speed commands are a nice and quick way to perform certain actions while at the beginning of a heading. It's not activated by default.
  176. See the doc for speed keys by checking out the documentation for speed keys in Org mode.
  177. #+begin_src emacs-lisp
  178. (setq org-use-speed-commands t)
  179. (setq org-image-actual-width 550)
  180. (setq org-highlight-latex-and-related '(latex script entities))
  181. #+end_src
  182. ** Org tags
  183. The default value is -77, which is weird for smaller width windows. I'd rather have the tags align horizontally with the header.
  184. 45 is a good column number to do that.
  185. #+begin_src emacs-lisp
  186. (setq org-tags-column 45)
  187. #+end_src
  188. ** Org babel languages
  189. #+begin_src emacs-lisp
  190. (org-babel-do-load-languages
  191. 'org-babel-load-languages
  192. '((python . t)
  193. (C . t)
  194. (calc . t)
  195. (latex . t)
  196. (java . t)
  197. (ruby . t)
  198. (lisp . t)
  199. (R . t)
  200. (scheme . t)
  201. (shell . t)
  202. (sqlite . t)
  203. (js . t)))
  204. (defun my-org-confirm-babel-evaluate (lang body)
  205. "Do not confirm evaluation for these languages."
  206. (not (or (string= lang "C")
  207. (string= lang "java")
  208. (string= lang "python")
  209. (string= lang "R")
  210. (string= lang "emacs-lisp")
  211. (string= lang "sqlite"))))
  212. (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
  213. #+end_src
  214. I want plots!
  215. #+begin_src emacs-lisp
  216. (use-package ess
  217. :ensure t
  218. )
  219. (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
  220. (add-hook 'org-mode-hook 'org-display-inline-images)
  221. #+end_src
  222. ** Org babel/source blocks
  223. I like to have source blocks properly syntax highlighted and with the editing popup window staying within the same window so all the windows don't jump around. Also, having the top and bottom trailing lines in the block is a waste of space, so we can remove them
  224. I noticed that fontification doesn't work with markdown mode when the block is indented after editing it in the org src buffer - the leading #s for headers don't get fontified properly because they apppear as Org comments. Setting ~org-src-preserve-identation~ makes things consistent as it doesn't pad source blocks with leading spaces
  225. #+begin_src emacs-lisp
  226. (setq org-src-fontify-natively t
  227. org-src-window-setup 'current-window
  228. org-src-strip-leading-and-trailing-blank-lines t
  229. org-src-preserve-indentation t
  230. org-src-tab-acts-natively t)
  231. #+end_src
  232. * which-key
  233. Greatly increases discovery of functions!
  234. Click [[https://github.com/justbur/emacs-which-key][here]] for source and more info.
  235. Info in Emacs: M-x customize-group which-key
  236. #+begin_src emacs-lisp
  237. (use-package which-key
  238. :ensure t
  239. :diminish which-key-mode
  240. :config
  241. (which-key-mode)
  242. (which-key-setup-side-window-right-bottom)
  243. (which-key-setup-minibuffer)
  244. (setq which-key-idle-delay 0.5)
  245. )
  246. #+end_src
  247. * Ido (currently inactive)
  248. better completion
  249. begin_src emacs-lisp
  250. (use-package ido
  251. :init
  252. (setq ido-enable-flex-matching t)
  253. (setq ido-everywhere t)
  254. (ido-mode t)
  255. (use-package ido-vertical-mode
  256. :ensure t
  257. :defer t
  258. :init
  259. (ido-vertical-mode 1)
  260. (setq ido-vertical-define-keys 'C-n-and-C-p-only)
  261. )
  262. )
  263. end_src
  264. * ivy / counsel / swiper
  265. Flx is required for fuzzy-matching
  266. Is it really necessary?
  267. begin_src emacs-lisp
  268. (use-package flx)
  269. end_src
  270. Ivy displays a window with suggestions for hotkeys and M-x
  271. #+begin_src emacs-lisp
  272. (use-package ivy
  273. :ensure t
  274. :diminish
  275. (ivy-mode . "") ;; does not display ivy in the mode line
  276. :init
  277. (ivy-mode 1)
  278. :bind
  279. ("C-c C-r" . ivy-resume)
  280. :config
  281. (setq ivy-use-virtual-buffers t) ;; recent files and bookmarks in ivy-switch-buffer
  282. (setq ivy-height 20) ;; height of ivy window
  283. (setq ivy-count-format "%d/%d") ;; current and total number
  284. (setq ivy-re-builders-alist ;; regex replaces spaces with *
  285. '((t . ivy--regex-plus)))
  286. )
  287. #+end_src
  288. Counsel replaces:
  289. - M-x
  290. - C-x C-f find-file
  291. - C-c h f describe-function
  292. - C-c h v describe-variable
  293. - M-i imenu
  294. The find-file replacement is nicer to navigate
  295. #+begin_src emacs-lisp
  296. (use-package counsel
  297. :ensure t
  298. :bind* ;; load counsel when pressed
  299. (("M-x" . counsel-M-x)
  300. ("C-x C-f" . counsel-find-file)
  301. ("C-c h f" . counsel-describe-function)
  302. ("C-c h v" . counsel-describe-variable)
  303. ("M-i" . counsel-imenu)
  304. )
  305. )
  306. #+end_src
  307. Swiper ivy-enhances isearch
  308. #+begin_src emacs-lisp
  309. (use-package swiper
  310. :ensure t
  311. :bind
  312. (("C-s" . swiper)
  313. ("C-c C-r" . ivy-resume)
  314. )
  315. )
  316. #+end_src
  317. * Recentf
  318. Requires counsel
  319. #+begin_src emacs-lisp
  320. (use-package recentf
  321. :bind ("C-x C-r" . counsel-recentf)
  322. :config
  323. (recentf-mode t)
  324. (setq recentf-max-saved-items 200)
  325. )
  326. #+end_src
  327. * Programming
  328. ** Common things
  329. List of plugins and settings which are shared between the language plugins
  330. Highlight whitespaces, tabs, empty lines.
  331. #+begin_src emacs-lisp
  332. (use-package whitespace
  333. :demand t
  334. :ensure nil
  335. :init
  336. (dolist (hook '(prog-mode-hook
  337. text-mode-hook
  338. conf-mode-hook))
  339. (add-hook hook #'whitespace-mode))
  340. ;; :hook ;;not working in use-package 2.3
  341. ;; ((prog-mode . whitespace-turn-on)
  342. ;; (text-mode . whitespace-turn-on))
  343. :config
  344. (setq-default whitespace-style '(face empty tab trailing))
  345. )
  346. #+end_src
  347. Disable Eldoc, it interferes with flycheck
  348. #+begin_src emacs-lisp
  349. (use-package eldoc
  350. :ensure nil
  351. :config
  352. (global-eldoc-mode -1)
  353. )
  354. #+end_src
  355. Colorize colors as text with their value
  356. #+begin_src emacs-lisp
  357. (use-package rainbow-mode
  358. :ensure t
  359. :init
  360. (add-hook 'prog-mode-hook 'rainbow-mode t)
  361. ;; :hook prog-mode ;; not working in use-package 2.3
  362. :config
  363. (setq-default rainbow-x-colors-major-mode-list '())
  364. )
  365. #+end_src
  366. ** Company Mode
  367. Complete Anything!
  368. Activate company and make it react nearly instantly
  369. #+begin_src emacs-lisp
  370. (use-package company
  371. :ensure t
  372. :config
  373. (setq-default company-minimum-prefix-length 1
  374. company-tooltip-align-annotation t
  375. company-tooltop-flip-when-above t
  376. company-show-numbers t
  377. company-idle-delay 0.1)
  378. )
  379. #+end_src
  380. *** Company backend hooks
  381. Backend configuration for python-mode
  382. Common backends are:
  383. - company-files: files & directory
  384. - company-keywords: keywords
  385. - company-capf: ??
  386. - company-abbrev: ??
  387. - company-dabbrev: dynamic abbreviations
  388. - company-ispell: ??
  389. #+begin_src emacs-lisp
  390. (defun company/python-mode-hook()
  391. (set (make-local-variable 'company-backends)
  392. '((company-jedi company-dabbrev) company-capf company-files))
  393. (company-mode t)
  394. )
  395. #+end_src
  396. Backend configuration for lisp-mode
  397. #+begin_src emacs-lisp
  398. (defun company/elisp-mode-hook()
  399. (set (make-local-variable 'company-backends)
  400. '((company-elisp company-dabbrev) company-capf company-files))
  401. (company-mode t)
  402. )
  403. #+end_src
  404. *** Misc Company packages
  405. Addon to sort suggestions by usage
  406. #+begin_src emacs-lisp
  407. (use-package company-statistics
  408. :ensure t
  409. :after company
  410. :config
  411. (company-statistics-mode 1)
  412. )
  413. #+end_src
  414. Get a popup with documentation of the completion candidate.
  415. For the popups the package pos-tip.el is used and automatically installed.
  416. [[https://github.com/expez/company-quickhelp][Company Quickhelp]]
  417. [[https://www.emacswiki.org/emacs/PosTip][See here for Pos-Tip details]]
  418. #+begin_src emacs-lisp
  419. (use-package company-quickhelp
  420. :ensure t
  421. :after company
  422. :config
  423. (company-quickhelp-mode 1)
  424. )
  425. #+end_src
  426. Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's a dictionary based on major modes, plus it has Yasnippet integration.
  427. ** Projectile
  428. Brings search functions on project level
  429. #+begin_src emacs-lisp
  430. (use-package projectile
  431. :ensure t
  432. :defer t
  433. :bind
  434. (("C-c p p" . projectile-switch-project)
  435. ("C-c p s s" . projectile-ag))
  436. :init
  437. (setq-default
  438. projectile-cache-file (expand-file-name ".projectile-cache" user-emacs-directory)
  439. projectile-known-projects-file (expand-file-name
  440. ".projectile-bookmarks" user-emacs-directory))
  441. :config
  442. (projectile-mode t)
  443. (setq-default
  444. projectile-completion-system 'ivy
  445. projectile-enable-caching t
  446. projectile-mode-line '(:eval (projectile-project-name)))
  447. )
  448. #+end_src
  449. ** Lisp
  450. #+begin_src emacs-lisp
  451. (add-hook 'emacs-lisp-mode-hook 'company/elisp-mode-hook)
  452. #+end_src
  453. ** Python
  454. Systemwide following packages need to be installed:
  455. - venv
  456. The virtual environments need to have following modules installed:
  457. - jedi
  458. - epc
  459. - pylint
  460. #+begin_src emacs-lisp
  461. (use-package flycheck
  462. :ensure t
  463. :init
  464. (add-hook 'after-init-hook #'global-flycheck-mode)
  465. (add-hook 'python-mode-hook (lambda ()
  466. (semantic-mode 1)
  467. (flycheck-select-checker 'python-pylint)))
  468. )
  469. #+end_src
  470. Automatically start python-mode when opening a .py-file.
  471. Not sure if python.el is better than python-mode.el.
  472. See [[https://github.com/jorgenschaefer/elpy/issues/887][here]] for info about ~python-shell-completion-native-enable~.
  473. The custom function is to run inferiour processes (do I really need that?), see [[https://emacs.stackexchange.com/questions/16361/how-to-automatically-run-inferior-process-when-loading-major-mode][here]].
  474. Also limit the completion backends to those which make sense in Python.
  475. #+begin_src emacs-lisp
  476. (use-package python
  477. :mode ("\\.py\\'" . python-mode)
  478. :interpreter ("python" . python-mode)
  479. :init
  480. (add-hook 'python-mode-hook 'company/python-mode-hook)
  481. :config
  482. (setq python-shell-completion-native-enable nil)
  483. )
  484. #+end_src
  485. Jedi is a backend for python autocompletion and needs to be installed on the server:
  486. - pip install jedi
  487. Code checks need to be installed, too:
  488. - pip install flake8
  489. #+begin_src emacs-lisp
  490. (use-package company-jedi
  491. :defer t
  492. ;; :after company
  493. :ensure t
  494. :config
  495. (setq jedi:environment-virtualenv (list (expand-file-name "~/Archiv/Programmierprojekte/Python/virtualenv/")))
  496. (setq jedi:python-environment-directory (list (expand-file-name "~/Archiv/Programmierprojekte/Python/virtualenv/")))
  497. (add-hook 'python-mode-hook 'jedi:setup)
  498. (setq jedi:complete-on-dot t)
  499. (setq jedi:use-shortcuts t)
  500. ;; (add-hook 'python-mode-hook 'company/python-mode-hook)
  501. )
  502. #+end_src
  503. A wrapper to handle virtual environments.
  504. I strongly recommend to install virtual environments on the terminal, not through this wrapper, but changing venvs is fine.
  505. TODO: automatically start an inferior python process or switch to it if already created
  506. #+begin_src emacs-lisp
  507. (use-package pyvenv
  508. :ensure t
  509. :init
  510. (setenv "WORKON_HOME" (expand-file-name "~/Archiv/Programmierprojekte/Python/virtualenv/"))
  511. :config
  512. (pyvenv-mode t)
  513. (defun my/post-activate-hook()
  514. (setq jedi:environment-root pyvenv-virtual-env)
  515. (setq jedi:environment-virtualenv pyvenv-virtual-env)
  516. (setq jedi:tooltip-method '(nil)) ;; variants: nil or pos-tip and/or popup
  517. (setq python-shell-virtualenv-root pyvenv-virtual-env)
  518. ;; default traceback, other option M-x jedi:toggle-log-traceback
  519. ;; traceback is in jedi:pop-to-epc-buffer
  520. (jedi:setup)
  521. (company/python-mode-hook)
  522. (setq jedi:server-args '("--log-traceback")))
  523. ;; (add-to-list 'company-backends 'company-jedi)
  524. ;; (add-to-list 'company-backends 'company-anaconda)
  525. ;; (lambda ()
  526. ;; (set (make-local-variable 'company-backends)
  527. ;; '((company-jedi company-dabbrev) company-capf company-files)))
  528. ;; (setq flycheck-checker 'python-pylint))
  529. ;; (flycheck-select-checker 'python-pylint))
  530. ;; (setq flycheck-checker 'python-flake8)
  531. (add-hook 'pyvenv-post-activate-hooks 'my/post-activate-hook)
  532. )
  533. #+end_src
  534. I want Emacs to automatically start the proper virtual environment.
  535. Required is a .python-version file with, content in the first line being /path/to/virtualenv/
  536. [[https://github.com/marcwebbie/auto-virtualenv][Github source]]
  537. Depends on pyvenv
  538. #+begin_src emacs-lisp
  539. (use-package auto-virtualenv
  540. :ensure t
  541. ;; :after pyvenv
  542. ;; :defer t
  543. :init
  544. (add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv)
  545. ;; activate on changing buffers
  546. ;; (add-hook 'window-configuration-change-hook 'auto-virtualenv-set-virtualenv)
  547. ;; activate on focus in
  548. ;; (add-hook 'focus-in-hook 'auto-virtualenv-set-virtualenv)
  549. )
  550. #+end_src
  551. Anaconda test
  552. begin_src emacs-lisp
  553. (use-package anaconda-mode
  554. :ensure t
  555. :defer t
  556. :init
  557. (add-hook 'python-mode-hook 'anaconda-mode)
  558. ;; (add-hook 'python-mode-hook 'anaconda-eldoc-mode)
  559. :config
  560. (setq anaconda-eldoc-mode 1)
  561. )
  562. end_src
  563. begin_src emacs-lisp
  564. (use-package company-anaconda
  565. :ensure t
  566. :defer t
  567. :init
  568. (defun my/company-anaconda-hook()
  569. (add-to-list 'company-backends 'company-anaconda))
  570. (add-hook 'python-mode-hook 'my/company-anaconda-hook)
  571. )
  572. end_src
  573. * Hydra
  574. Hydra allows grouping of commands
  575. #+begin_src emacs-lisp
  576. (use-package hydra
  577. :ensure t
  578. :bind
  579. ("C-c f" . hydra-flycheck/body)
  580. :config
  581. (setq-default hydra-default-hint nil)
  582. )
  583. #+end_src
  584. ** Hydra Flycheck
  585. Flycheck is necessary, obviously
  586. #+begin_src emacs-lisp
  587. (defhydra hydra-flycheck (:color blue)
  588. "
  589. ^
  590. ^Flycheck^ ^Errors^ ^Checker^
  591. ^────────^──────────^──────^────────────^───────^───────────
  592. _q_ quit _<_ previous _?_ describe
  593. _m_ manual _>_ next _d_ disable
  594. _v_ verify setup _f_ check _s_ select
  595. ^^ ^^ ^^
  596. "
  597. ("q" nil)
  598. ("<" flycheck-previous-error :color red)
  599. (">" flycheck-next-error :color red)
  600. ("?" flycheck-describe-checker)
  601. ("d" flycheck-disable-checker)
  602. ("f" flycheck-buffer)
  603. ("m" flycheck-manual)
  604. ("s" flycheck-select-checker)
  605. ("v" flycheck-verify-setup)
  606. )
  607. #+end_src
  608. * Quality of Life