Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Racket | ||
|
||
![logo_racket](img/racket.png) | ||
|
||
Adds support for the [Racket](http://racket-lang.org/) programming language. | ||
|
||
## Key Bindings | ||
|
||
Key Binding | Description | ||
----------------------|------------------------------------------------------------ | ||
<kbd>SPC m r</kbd> | Run current file and open REPL | ||
<kbd>SPC m l</kbd> | Enter [Evil Lisp State](https://github.com/syl20bnr/evil-lisp-state) | ||
<kbd>SPC m t</kbd> | Run tests | ||
<kbd>SPC m g</kbd> | Visit definition | ||
<kbd>SPC m h d</kbd> | Visit Documentation | ||
<kbd>H-r</kbd> | Run current file and open REPL (`H` is hyper, *may* be bound to command on OSX) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(defvar racket-packages | ||
'(racket-mode)) | ||
|
||
(defun racket/init-racket-mode () | ||
(use-package racket-mode | ||
:defer t | ||
:config | ||
(progn | ||
(use-package smartparens :config | ||
(progn (add-to-list 'sp--lisp-modes 'racket-mode) | ||
(when (fboundp 'sp-local-pair) (sp-local-pair 'racket-mode "`" nil :actions nil)))) | ||
(sp-local-pair 'racket-mode "'" nil :actions nil) | ||
(evil-leader/set-key-for-mode 'racket-mode | ||
"ml" 'evil-lisp-state | ||
"mt" 'racket-test | ||
"mr" 'racket-run | ||
"mg" 'racket-visit-definition | ||
"mhd" 'racket-doc) | ||
;; Bug exists in Racket company backend that opens docs in new window when | ||
;; company-quickhelp calls it. Note hook is appendended for proper ordering. | ||
(when (configuration-layer/package-declaredp 'company-quickhelp) | ||
(add-hook 'company-mode-hook | ||
'(lambda () (when (equal major-mode 'racket-mode) (company-quickhelp-mode -1))) t)) | ||
(add-hook 'racket-mode-hook | ||
'(lambda () | ||
(define-key racket-mode-map (kbd "H-r") 'racket-run)))))) |