-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathontop-scheme.el
144 lines (112 loc) · 4.06 KB
/
ontop-scheme.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
;;; ontop-scheme.el --- Scheme with Geiser -*- lexical-binding: t; -*-
;; This file is part of Emacs ONTOP
;; https://github.com/monkeyjunglejuice/emacs.ontop
;;; Commentary:
;; You can also use this file/configuration independently from Emacs ONTOP
;; Load it from anywhere via `(load-file "/path/to/ontop-scheme.el")'.
;;; Code:
;; ____________________________________________________________________________
;;; USE-PACKAGE
;; <https://github.com/jwiegley/use-package>
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package nil))
(eval-when-compile
(require 'use-package))
;; ____________________________________________________________________________
;;; GEISER
;; <https://www.nongnu.org/geiser/>
(use-package geiser
:ensure t
:custom
(geiser-repl-send-on-return-p t)
(geiser-repl-use-other-window nil)
(scheme-mit-dialect nil)
;; Set Geiser's default implementation?
;; (geiser-default-implementation 'guile)
)
;; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
;;; GEISER IMPLEMENTATION PACKAGES
;; Unquote and configure the corresponding package(s) for your Scheme(s) below,
;; and then then evaluate the expression(s) or restart Emacs.
;; <https://gitlab.com/emacs-geiser/chez>
;; (use-package geiser-chez
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/chicken>
;; (use-package geiser-chicken
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/chibi>
;; (use-package geiser-chibi
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/gambit>
;; (use-package geiser-gambit
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/gauche>
;; (use-package geiser-gauche
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/guile>
(use-package geiser-guile
:ensure t)
;; <https://gitlab.com/emacs-geiser/kawa>
;; (use-package geiser-kawa
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/mit>
;; (use-package geiser-mit
;; :ensure t
;; :config
;; (use-package scheme
;; :custom
;; (scheme-mit-dialect t)))
;; <https://gitlab.com/emacs-geiser/racket>
;; (use-package geiser-racket
;; :ensure t)
;; <https://gitlab.com/emacs-geiser/stklos>
;; (use-package geiser-stklos
;; :ensure t)
;; ____________________________________________________________________________
;;; SRFI BROWSER
;; <https://github.com/srfi-explorations/emacs-srfi>
(use-package srfi
:ensure t)
;; ____________________________________________________________________________
;;; STRUCTURAL EDITING
;; SMARTPARENS
;; <https://github.com/Fuco1/smartparens>
;; <https://smartparens.readthedocs.io/en/latest/>
;; Smartparens non-strict mode is already enabled globally
;; and configured in `ontop-core.el'
(use-package smartparens
:ensure t
:hook
(scheme-mode . smartparens-strict-mode))
;; ____________________________________________________________________________
;;; PARENTHESIS DISPLAY
;; Rainbow-delimiters color-coding of nested parens is already enabled
;; for all prog-modes in `ontop-core.el'
(use-package rainbow-delimiters
:ensure t
:hook
((inferior-scheme-mode geiser-repl-mode) . rainbow-delimiters-mode))
;; Make parens styleable, e.g. more or less prominent
;; <https://github.com/tarsius/paren-face>
;; (use-package paren-face
;; :ensure t
;; :hook
;; ((scheme-mode inferior-scheme-mode geiser-repl-mode) . paren-face-mode))
;; ____________________________________________________________________________
;;; ORG-MODE BABEL
;; <https://orgmode.org/worg/org-contrib/babel/index.html>
;; Notebook-like literate programming in Emacs
;; Evaluate Scheme code in Org source code blocks via "C-c C-c"
;; TODO This seems not to work; neither with Chicken nor Racket
;; <https://www.orgmode.org/worg/org-contrib/babel/languages/ob-doc-scheme.html>
(use-package org
:ensure nil
:hook
(org-mode . (lambda ()
(org-babel-do-load-languages
'org-babel-load-languages
(add-to-list 'org-babel-load-languages '(scheme . t))))))
;; ____________________________________________________________________________
(provide 'ontop-scheme)
;;; ontop-scheme.el ends here