Moving to Doom Emacs!

This commit is contained in:
Derek Taylor
2019-12-16 20:21:19 -06:00
parent d9f2f456f1
commit d4b4c33550
683 changed files with 51877 additions and 100 deletions

View File

@@ -0,0 +1,12 @@
;;; lang/racket/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +racket/open-repl ()
"Open the Racket REPL."
(interactive)
(pop-to-buffer
(or (get-buffer "*Racket REPL*")
(progn (racket-run-and-switch-to-repl)
(let ((buf (get-buffer "*Racket REPL*")))
(bury-buffer buf)
buf)))))

View File

@@ -0,0 +1,59 @@
;;; lang/racket/config.el -*- lexical-binding: t; -*-
(after! projectile
(add-to-list 'projectile-project-root-files "info.rkt"))
;;
;;; Packages
(use-package! racket-mode
:hook (racket-repl-mode . racket-unicode-input-method-enable)
:config
(set-repl-handler! 'racket-mode #'+racket/open-repl)
(set-lookup-handlers! 'racket-mode
:definition #'racket-visit-definition
:documentation #'racket-describe)
(set-docsets! 'racket-mode "Racket")
(set-pretty-symbols! 'racket-mode
:lambda "lambda"
:map "map"
:dot ".")
(set-rotate-patterns! 'racket-mode
:symbols '(("#true" "#false")))
(add-hook! 'racket-mode-hook
#'rainbow-delimiters-mode
#'highlight-quoted-mode
#'racket-smart-open-bracket-mode)
(map! :localleader
:map racket-mode-map
"a" #'racket-align
"A" #'racket-unalign
"f" #'racket-fold-all-tests
"F" #'racket-unfold-all-tests
"h" #'racket-doc
"i" #'racket-unicode-input-method-enable
"l" #'racket-logger
"o" #'racket-profile
"p" #'racket-cycle-paren-shapes
"r" #'racket-run
"R" #'racket-run-and-switch-to-repl
"t" #'racket-test
"u" #'racket-backward-up-list
"y" #'racket-insert-lambda
(:prefix ("m" . "macros")
"d" #'racket-expand-definition
"e" #'racket-expand-last-sexp
"r" #'racket-expand-region
"a" #'racket-expand-again)
(:prefix ("g" . "goto")
"b" #'racket-unvisit
"d" #'racket-visit-definition
"m" #'racket-visit-module
"r" #'racket-open-require-path)
(:prefix ("s" . "send")
"d" #'racket-send-definition
"e" #'racket-send-last-sexp
"r" #'racket-send-region)))

View File

@@ -0,0 +1,11 @@
;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; lang/racket/doctor.el
(unless (executable-find "drracket")
(warn! "Could not find drracket executable; code-completion and syntax checking will not work."))
(unless (executable-find "racket")
(warn! "Could not find racket executable; REPL will not work."))
(unless (executable-find "raco")
(warn! "Could not find raco executable; commands for install packages and build libraries will not work."))

View File

@@ -0,0 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/racket/packages.el
(package! racket-mode)