refactor(emacs): remove racket.el
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
d66a9cd13c
commit
0cf7b18000
4 changed files with 39 additions and 65 deletions
|
@ -27,6 +27,16 @@
|
||||||
(kill-line)
|
(kill-line)
|
||||||
(meow-insert))
|
(meow-insert))
|
||||||
|
|
||||||
|
;; (flycheck-define-checker racket-review
|
||||||
|
;; "check racket source code using racket review"
|
||||||
|
;; :command ("raco" "review" source)
|
||||||
|
;; :error-patterns
|
||||||
|
;; ((error line-start (file-name) ":" line ":" column ":error:" (message) line-end)
|
||||||
|
;; (warning line-start (file-name) ":" line ":" column ":warning:" (message) line-end))
|
||||||
|
;; :modes racket-mode)
|
||||||
|
|
||||||
|
;;; Packages
|
||||||
|
|
||||||
(use-package meow :straight t
|
(use-package meow :straight t
|
||||||
:bind (("C-q" . meow-quit))
|
:bind (("C-q" . meow-quit))
|
||||||
:custom
|
:custom
|
||||||
|
@ -117,8 +127,7 @@
|
||||||
(use-package flycheck :straight t
|
(use-package flycheck :straight t
|
||||||
:custom
|
:custom
|
||||||
(flycheck-check-syntax-automatically '(save mode-enable))
|
(flycheck-check-syntax-automatically '(save mode-enable))
|
||||||
:init
|
:hook (after-init . global-flycheck-mode))
|
||||||
(add-hook 'after-init-hook 'global-flycheck-mode))
|
|
||||||
(use-package paredit :straight t
|
(use-package paredit :straight t
|
||||||
:bind (("M-<backspace>" . #'backward-kill-sexp)
|
:bind (("M-<backspace>" . #'backward-kill-sexp)
|
||||||
("M-k" . #'kill-sexp))
|
("M-k" . #'kill-sexp))
|
||||||
|
|
|
@ -16,10 +16,38 @@
|
||||||
(append (transient-args 'justl-help-popup)
|
(append (transient-args 'justl-help-popup)
|
||||||
(list just-recipe)))))
|
(list just-recipe)))))
|
||||||
|
|
||||||
|
(defun racket-repl-switch ()
|
||||||
|
"Switch to the Racket REPL."
|
||||||
|
(interactive)
|
||||||
|
(racket-edit-switch-to-repl)
|
||||||
|
(unless (equal current-prefix-arg nil)
|
||||||
|
(delete-other-windows)))
|
||||||
|
|
||||||
|
(defun racket-edit-switch ()
|
||||||
|
"Switch to the corresponding racket buffer."
|
||||||
|
(interactive)
|
||||||
|
(racket-repl-switch-to-edit)
|
||||||
|
(unless (equal current-prefix-arg nil)
|
||||||
|
(delete-other-windows)))
|
||||||
|
|
||||||
|
;;; Languages
|
||||||
|
|
||||||
(use-package racket-mode :straight t
|
(use-package racket-mode :straight t
|
||||||
|
:bind (:map racket-mode-map
|
||||||
|
("C-c C-z" . racket-repl-switch)
|
||||||
|
:map racket-repl-mode-map
|
||||||
|
("C-c C-k" . racket-repl-clear-leaving-last-prompt)
|
||||||
|
("C-c C-z" . racket-edit-switch))
|
||||||
:hook
|
:hook
|
||||||
((racket-mode . racket-xp-mode)
|
((racket-mode . racket-xp-mode)
|
||||||
(racket-mode . paredit-mode)))
|
(racket-mode . paredit-mode)))
|
||||||
|
(use-package pollen-mode :straight t
|
||||||
|
:init
|
||||||
|
(setq auto-mode-alist
|
||||||
|
(append '(("\\.pp$" . racket-mode)
|
||||||
|
("\\.pm$" . pollen-mode)
|
||||||
|
("\\.pmd$" . pollen-mode))
|
||||||
|
auto-mode-alist)))
|
||||||
(use-package rust-mode :straight t
|
(use-package rust-mode :straight t
|
||||||
:hook (rust-mode . eglot))
|
:hook (rust-mode . eglot))
|
||||||
(use-package rustic :straight t)
|
(use-package rustic :straight t)
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
;;; racket.el --- Configuration for Racket.
|
|
||||||
;;; Commentary:
|
|
||||||
;; Configuration for Racket and Racket-based languages, including Pollen.
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'racket-mode)
|
|
||||||
(require 'racket-edit)
|
|
||||||
|
|
||||||
(add-to-list 'load-path (expand-file-name "lisp/pollen-mode" user-emacs-directory))
|
|
||||||
(autoload 'pollen-mode "pollen" "A major mode for the pollen preprocessor." t)
|
|
||||||
|
|
||||||
(defun racket-repl-switch ()
|
|
||||||
"Switch to the Racket REPL."
|
|
||||||
(interactive)
|
|
||||||
(racket-edit-switch-to-repl)
|
|
||||||
(unless (equal current-prefix-arg nil)
|
|
||||||
(delete-other-windows)))
|
|
||||||
|
|
||||||
(defun racket-edit-switch ()
|
|
||||||
"Switch to the corresponding racket buffer."
|
|
||||||
(interactive)
|
|
||||||
(racket-repl-switch-to-edit)
|
|
||||||
(unless (equal current-prefix-arg nil)
|
|
||||||
(delete-other-windows)))
|
|
||||||
|
|
||||||
;; Recognize pollen filetypes
|
|
||||||
(setq auto-mode-alist (cons '("\\.pp$" . racket-mode) auto-mode-alist))
|
|
||||||
(setq auto-mode-alist (cons '("\\.pm$" . pollen-mode) auto-mode-alist))
|
|
||||||
(setq auto-mode-alist (cons '("\\.pmd$" . pollen-mode) auto-mode-alist))
|
|
||||||
|
|
||||||
;; raco review flycheck support
|
|
||||||
(flycheck-define-checker racket-review
|
|
||||||
"check racket source code using racket review"
|
|
||||||
:command ("raco" "review" source)
|
|
||||||
:error-patterns
|
|
||||||
((error line-start (file-name) ":" line ":" column ":error:" (message) line-end)
|
|
||||||
(warning line-start (file-name) ":" line ":" column ":warning:" (message) line-end))
|
|
||||||
:modes racket-mode)
|
|
||||||
(add-to-list 'flycheck-checkers 'racket-review)
|
|
||||||
(add-to-list 'flycheck-disabled-checkers 'racket)
|
|
||||||
|
|
||||||
(defun configure-racket ()
|
|
||||||
"Configure keybinds for racket buffers."
|
|
||||||
(keymap-local-set "C-c C-z" #'racket-repl-switch))
|
|
||||||
|
|
||||||
(add-hook 'racket-mode-hook #'configure-racket)
|
|
||||||
|
|
||||||
(defun configure-racket-repl ()
|
|
||||||
"Configure keybinds for the racket repl."
|
|
||||||
(keymap-local-set "C-c C-k" #'racket-repl-clear-leaving-last-prompt)
|
|
||||||
(keymap-local-set "C-c C-z" #'racket-edit-switch))
|
|
||||||
|
|
||||||
(add-hook 'racket-repl-mode-hook #'configure-racket-repl)
|
|
||||||
|
|
||||||
(defun configure-scribble ()
|
|
||||||
"Configure keybinds for scribble."
|
|
||||||
(keymap-local-set "C-c C-c" #'compile))
|
|
||||||
|
|
||||||
(add-hook 'scribble-mode-hook #'configure-scribble)
|
|
||||||
|
|
||||||
(provide 'racket)
|
|
||||||
;;; racket.el ends here
|
|
|
@ -35,7 +35,6 @@
|
||||||
;; Legacy
|
;; Legacy
|
||||||
(when (equal (system-name) "framework")
|
(when (equal (system-name) "framework")
|
||||||
(load-library "mu4econfig"))
|
(load-library "mu4econfig"))
|
||||||
(load-library "racket")
|
|
||||||
(load-library "latexconfig")
|
(load-library "latexconfig")
|
||||||
(load-library "cppconfig")
|
(load-library "cppconfig")
|
||||||
(load-library "gpgconfig")
|
(load-library "gpgconfig")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue