-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.el
115 lines (90 loc) · 3.79 KB
/
config.el
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq display-line-numbers-type t)
(setq org-directory "~/org/")
(setq doom-font "New Heterodox Mono A")
(setq-default tab-width 4
indent-tabs-mode nil
fill-column 100
vc-handled-backends `(Git))
(add-hook! fundamental-mode 'flyspell-mode)
(add-hook! fundamental-mode 'turn-on-auto-fill)
(add-hook! fundamental-mode 'display-fill-column-indicator-mode)
(add-hook! markdown-mode 'turn-on-auto-fill)
(add-hook! org-mode 'turn-on-auto-fill)
(add-hook 'dired-after-readin-hook 'dired-git-info-auto-enable)
(defun haskell-company-backends ()
(set (make-local-variable 'company-backends)
(append '((company-capf company-dabbrev-code company-yasnippet)) company-backends)))
;; (set-formatter! 'fourmolu "fourmolu" :modes '(haskell-mode))
(setq haskell-stack-compile-command "stack build --test --bench --no-run-tests --no-run-benchmarks --ghc-options='-j4 +RTS -A256m -I0 -RTS -Wwarn' --no-interleaved-output"
haskell-stack-test-command "stack build --test"
lsp-haskell-server-path "haskell-language-server-wrapper"
lsp-haskell-formatting-provider 'ormolu-format-buffer
lsp-haskell-tactic-on nil
lsp-haskell-check-project nil
lsp-haskell-plugin-stan-global-on nil
lsp-haskell-diagnostics-on-change nil)
(setq-hook! 'haskell-mode-hook
compile-command haskell-compile-cabal-build-command
display-fill-column-indicator-column 100
ormolu-process-path "fourmolu")
(add-hook! haskell-mode 'display-fill-column-indicator-mode)
(add-hook! haskell-mode 'ormolu-format-on-save-mode)
(add-hook! haskell-mode 'haskell-company-backends)
(add-hook! haskell-mode (set (make-local-variable 'compile-command)
haskell-stack-compile-command))
;; LSP
(setq lsp-ui-sideline-enable nil
lsp-ui-doc-enable nil
lsp-ui-doc-max-height 30
lsp-ui-doc-max-height 100
lsp-enable-file-watchers nil
lsp-haskell-plugin-stan-global-on nil
lsp-haskell-plugin-tactics-global-on nil
lsp-haskell-check-project nil
lsp-before-save-edits nil)
(setq +format-on-save-enabled-modes
'(not emacs-lisp-mode
haskell-mode
sql-mode
yaml-mode
sh-mode))
;; Ivy
(add-to-list 'completion-ignored-extensions ".hie")
(add-to-list 'completion-ignored-extensions ".stack-work")
(setq! ivy-case-fold-search t
ivy-virtual-abbreviate 'full
ivy-extra-directories nil
counsel-find-file-ignore-regexp (concat (regexp-opt completion-ignored-extensions) "\\'"))
;; Smudge
;; (after! smudge
;; (setq! smudge-oauth2-client-secret "")
;; (setq! smudge-oauth2-client-id "")
;; (define-key smudge-mode-map (kbd "C-c .") 'smudge-command-map)
;; (setq! smudge-transport 'connect))
;; Slack
;; (setq! slack-prefer-current-team t)
;; (setq! slack-buffer-emojify t)
;; Secrets
(when (file-exists-p! "secrets.el" doom-user-dir)
(load! "secrets.el" doom-user-dir))
;; (require 'org-table)
;; (defun md-table-align ()
;; (interactive)
;; (org-table-align)
;; (save-excursion
;; (goto-char (point-min))
;; (while (search-forward "-+-" nil t) (replace-match "-|-"))))
(after! projectile
(projectile-register-project-type 'haskell-stack '("stack.yaml")
:compile haskell-stack-compile-command
:test haskell-stack-test-command)
)
(set-eshell-alias! "shake" "stack exec shake --")
(add-hook! rjsx-mode 'prettier-js-mode)
(put 'haskell-hoogle-command 'safe-local-variable #'stringp)
(put 'haskell-hoogle-server-command 'safe-local-variable (lambda (_) t))
(map! :leader (:prefix ("s" . "search") :desc "Rg" "g" #'rg))
(after! ellama
(setopt ellama-language "English"
ellama-provider (make-llm-ollama :chat-model "codellama" :embedding-model "codellama")))