-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstan.el
75 lines (66 loc) · 2.14 KB
/
stan.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
;;; stan.el --- R setup -*- lexical-binding: t; -*-
;;; stan-mode.el
(use-package stan-mode
:mode ("\\.stan\\'" . stan-mode)
:hook (stan-mode . stan-mode-setup)
;;
:config
;; The officially recommended offset is 2.
(setq stan-indentation-offset 2))
;;; company-stan.el
(use-package company-stan
:hook (stan-mode . company-stan-setup)
;;
:config
;; Whether to use fuzzy matching in `company-stan'
(setq company-stan-fuzzy nil)
(defun jds~setup-capf-stan ()
(make-local-variable 'completion-at-point-function)
(add-to-list 'completion-at-point-functions
(cape-company-to-capf #'company-stan-backend)))
(add-hook 'stan-mode-hook 'jds~setup-capf-stan))
;;; eldoc-stan.el
(use-package eldoc-stan
:hook (stan-mode . eldoc-stan-setup)
;;
:config
;; No configuration options as of now.
)
;; https://git.kyleam.com/ob-stan/about/
;; seems pretty outdated
;; (use-package ob-stan
;; :straight (ob-stan :local-repo "~/.emacs.d/local-packages/ob-stan/"))
;;; flycheck-stan.el
;; (use-package flycheck-stan
;; ;; Add a hook to setup `flycheck-stan' upon `stan-mode' entry
;; :hook ((stan-mode . flycheck-stan-stanc2-setup)
;; (stan-mode . flycheck-stan-stanc3-setup))
;; :config
;; ;; A string containing the name or the path of the stanc2 executable
;; ;; If nil, defaults to `stanc2'
;; (setq flycheck-stanc-executable nil)
;; ;; A string containing the name or the path of the stanc2 executable
;; ;; If nil, defaults to `stanc3'
;; (setq flycheck-stanc3-executable nil))
;;; stan-snippets.el
(use-package stan-snippets
:hook (stan-mode . stan-snippets-initialize)
;;
:config
;; No configuration options as of now.
)
;; ;;; ac-stan.el (Not on MELPA; Need manual installation)
;; (use-package ac-stan
;; :load-path "path-to-your-directory/ac-stan/"
;; ;; Delete the line below if using.
;; :disabled t
;; :hook (stan-mode . stan-ac-mode-setup)
;; ;;
;; :config
;; ;; No configuration options as of now.
;; )
;;; bindings -------------------------------------------------------------------
(jds/localleader-def
:keymaps 'stan-mode-map
"'" #'org-edit-src-exit
"k" #'org-edit-src-abort)