blob: e82931b82fe20d1d349ec7e065a0d2da781c4520 (
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
|
(use-package eglot :ensure t)
;; Dart
(setq dart-server-format-on-save t)
(add-hook 'dart-mode-hook 'lsp)
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024))
;; Go
(use-package go-mode
:ensure t
:init
(progn
(bind-key [remap find-tag] #'godef-jump))
:config
(add-hook 'go-mode-hook #'yas-minor-mode)
(add-hook 'go-mode-hook 'electric-pair-mode)
(add-hook 'go-mode-hook 'my-go-mode-hook)
(add-hook 'before-save-hook 'gofmt-before-save))
(use-package go-eldoc
:ensure t
:init
(add-hook 'go-mode-hook 'go-eldoc-setup))
;; Define function to call when go-mode loads
(defun my-go-mode-hook ()
(set 'compile-command "go build -v && go test -v && go vet"))
;; Latex
(add-hook 'latex-mode-hook 'flyspell-mode)
(setq TeX-PDF-mode t)
(defun pdfevince ()
(add-to-list 'TeX-output-view-style
'("^pdf$" "." "evince %o %(outpage)")))
(add-hook 'LaTeX-mode-hook 'pdfevince t) ; AUCTeX LaTeX mode
;; Markdown
(use-package markdown-mode
:ensure t
:config
(setq auto-mode-alist
(cons '("\\.mdwn" . markdown-mode) auto-mode-alist)))
;; Python
(use-package blacken :ensure t :defer t)
(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
;; Terraform
(use-package terraform-mode :ensure t :defer t)
;; YAML
(use-package yaml-mode :ensure t :defer t)
;; Rust
(use-package rust-mode
:defer t
:init
(setq rust-mode-treesitter-derive t)
:config
(add-hook 'rust-mode-hook 'eglot-ensure)
)
(provide 'rul-prog)
|