Merge branch 'develop' into straight
This commit is contained in:
commit
5b1d7459bc
5 changed files with 90 additions and 0 deletions
|
@ -139,6 +139,7 @@
|
||||||
;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
|
;;scheme ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
|
|
38
modules/lang/scheme/README.org
Normal file
38
modules/lang/scheme/README.org
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#+TITLE: lang/scheme
|
||||||
|
#+DATE: July 23, 2019
|
||||||
|
#+SINCE: v2.0.9
|
||||||
|
#+STARTUP: inlineimages
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#features][Features]]
|
||||||
|
- [[#commands][Commands]]
|
||||||
|
- [[#geiser][Geiser]]
|
||||||
|
|
||||||
|
* Description
|
||||||
|
This module provides an environment for hacking and having fun in scheme. It is
|
||||||
|
powered by [[https://www.nongnu.org/geiser/geiser_1.html#introduction][geiser]].
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
|
||||||
|
* Prerequisites
|
||||||
|
This module requires you to have at least one of the supported schemes, namely:
|
||||||
|
- [[https://www.gnu.org/software/guile][Guile]] 2.2.0 or better
|
||||||
|
- [[https://call-cc.org][Chicken]] 4.8.0 or better
|
||||||
|
- [[https://www.gnu.org/software/mit-scheme][MIT/GNU Scheme]] 9.1.1 or better
|
||||||
|
- [[https://synthcode.com/scheme/chibi][Chibi Scheme]] 0.7.3 or better
|
||||||
|
- [[https://www.scheme.com][Chez Scheme]] 9.4 or better
|
||||||
|
|
||||||
|
Their executables must be present in your path for geiser to work properly.
|
||||||
|
|
||||||
|
* Features
|
||||||
|
** Commands
|
||||||
|
*** Geiser
|
||||||
|
| command | key / ex command | description |
|
||||||
|
|---------------------+------------------+----------------------|
|
||||||
|
| ~+scheme/open-repl~ | =:repl= | Open the Scheme Repl |
|
||||||
|
| | | |
|
8
modules/lang/scheme/autoload.el
Normal file
8
modules/lang/scheme/autoload.el
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
;;; lang/scheme/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +scheme/repl (&optional arg)
|
||||||
|
"Open the Scheme REPL."
|
||||||
|
(interactive "P")
|
||||||
|
(switch-to-geiser arg)
|
||||||
|
(current-buffer))
|
39
modules/lang/scheme/config.el
Normal file
39
modules/lang/scheme/config.el
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
;;; lang/scheme/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(add-hook 'scheme-mode-hook #'rainbow-delimiters-mode)
|
||||||
|
|
||||||
|
(def-package! geiser
|
||||||
|
:mode ("\\.scm\\'" . scheme-mode)
|
||||||
|
:mode ("\\.ss\\'" . scheme-mode)
|
||||||
|
:commands (geiser)
|
||||||
|
:init
|
||||||
|
(setq geiser-active-implementations '(guile chicken mit chibi chez))
|
||||||
|
(set-repl-handler! 'scheme-mode '+scheme/repl)
|
||||||
|
(set-eval-handler! 'scheme-mode #'geiser-eval-region)
|
||||||
|
(set-lookup-handlers! 'scheme-mode
|
||||||
|
:definition #'geiser-edit-symbol-at-point
|
||||||
|
:documentation #'geiser-doc-symbol-at-point)
|
||||||
|
:config
|
||||||
|
(map! (:localleader
|
||||||
|
(:map scheme-mode-map
|
||||||
|
"'" #'geiser-mode-switch-to-repl
|
||||||
|
"s" #'geiser-set-scheme
|
||||||
|
|
||||||
|
(:prefix ("e" . "eval")
|
||||||
|
"b" #'geiser-eval-buffer
|
||||||
|
"B" #'geiser-eval-buffer-and-go
|
||||||
|
"e" #'geiser-eval-definition
|
||||||
|
"E" #'geiser-eval-definition-and-go
|
||||||
|
"r" #'geiser-eval-region
|
||||||
|
"R" #'geiser-eval-region-and-go)
|
||||||
|
|
||||||
|
(:prefix ("h" . "help")
|
||||||
|
"d" 'geiser-autodoc)
|
||||||
|
;; TODO add more help keybindings
|
||||||
|
|
||||||
|
(:prefix ("r" . "repl")
|
||||||
|
"b" #'geiser-switch-to-repl
|
||||||
|
"q" #'geiser-repl-exit
|
||||||
|
"r" #'geiser-restart-repl
|
||||||
|
"R" #'geiser-reload
|
||||||
|
"c" #'geiser-repl-clear-buffer)))))
|
4
modules/lang/scheme/packages.el
Normal file
4
modules/lang/scheme/packages.el
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; lang/scheme/packages.el
|
||||||
|
|
||||||
|
(package! geiser)
|
Loading…
Add table
Add a link
Reference in a new issue