summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--devel.el
blob: 34d14fcf7a98b33abec10bd5a37c9021914f735d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
;; -*- lexical-binding: t; -*-


;;;; general
(defun remote-shell ()
  (interactive)
  (let ((default-directory "/ssh:bdunahu@perch"))
    (shell)))

(defun request-sudo ()
  "Uses TRAMP to edit current opened file as root."
  (interactive)
  (when buffer-file-name
    (find-alternate-file
     (concat "/sudo:root@localhost:"
             buffer-file-name))))


(setq compilation-always-kill t)

(add-hook 'prog-mode-hook (lambda ()
                            (font-lock-add-keywords
                             nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\)"
                                    1 font-lock-warning-face t)))))


(use-package company
  :hook (prog-mode)
  :custom
  (company-set-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.3)))
  (company-minimum-prefix-length 1)
  (company-tooltip-flip-when-above t)
  (company-show-numbers t)
  (company-tooltip-align-annotations t)
  (company-tooltip-limit 15)
  (company-selection-wrap-around t))

(use-package magit
  :commands magit-status
  :custom
  (magit-define-global-key-bindings 'recommended))


(use-package tex
  :ensure auctex
  :hook
  ((latex-mode)
   (text-mode . (lambda() (setq ispell-parser 'tex)))) ; improves ispell in LaTeX
  :config
  (push '(output-pdf "Zathura") TeX-view-program-selection)
  :custom
  (TeX-auto-save t)
  ;; better support for latex packages
  (TeX-parse-self t))

(use-package slime
  :commands slime
  :config
  (add-hook 'slime-mode-hook
            (lambda ()
              (local-set-key (kdb "C-c C-k") 'slime-eval-buffer)))
  :custom
  ;; more memory for ml libraries
  (inferior-lisp-program "sbcl --dynamic-space-size 4096"))


(provide 'bd--devel)