summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp/kj-bindings.el
blob: e9f3369037baf040e8fb7476feeae747486ccb02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;;; -*- lexical-binding: t; -*-

(use-package emacs
  :bind
  (("C-w" . kj/kill-word-or-region)
   ("C-c s" . kj/shell-here)
   ("C-c t" . eshell)
   ("M-o" . other-window)
   ("C-c a m" . notmuch)
   ("C-c M" . smerge-ediff)
   ("C-c b r" . revert-buffer)
   ("C-c r l" . consult-flymake)
   ("C-c r f" . eglot-format)
   ("C-c r g" . recompile)
   ("C-c r a" . eglot-code-actions)
   ("C-c r r" . eglot-rename)
   ("C-c r n" . flymake-goto-next-error)
   ("C-c r p" . flymake-goto-prev-error)
   ("C-c c i" . insert-char)
   ("C-c w u" . winner-undo)
   ("C-c w U" . winner-redo)
   ("C-<tab>" . completion-at-point))

  :config
  (defvar kj/flymake-repeat-map (make-sparse-keymap "flymake"))
  (define-repeating-key kj/flymake-repeat-map "n" flymake-goto-next-error "next error")
  (define-repeating-key kj/flymake-repeat-map "p" flymake-goto-prev-error "prev error")
  (define-key kj/flymake-repeat-map (kbd "C-g") '("quit" . ignore))
  )

(provide 'kj-bindings)