Skip to content

Commit a85e17f

Browse files
authored
feat: remove package gorepl-mode (#430)
This package depends on lv, hydra which are packages I don't use. Then again it is really simple to make a REPL. So bye bye package.
1 parent 3df319a commit a85e17f

File tree

3 files changed

+20
-82
lines changed

3 files changed

+20
-82
lines changed

init.org

+20-13
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,20 @@ Call ORIG-FN with ARGS and suppress the output. Usage:
291291
(quiet! (apply orig-fn args)))
292292
#+end_src
293293

294+
Easily define REPL functions.
295+
#+begin_src emacs-lisp :tangle yes
296+
(defmacro define-repl (fn-name buffer-name command &rest args)
297+
"Define a REPL function named FN-NAME running COMMAND inside BUFFER-NAME."
298+
(let ((repl-buffer (concat "*" buffer-name "*")))
299+
`(defun ,fn-name ()
300+
,(format "Run an inferior instance of %s inside Emacs." command)
301+
(interactive)
302+
(let ((buffer (get-buffer-create ,repl-buffer)))
303+
(unless (comint-check-proc ,repl-buffer)
304+
(apply 'make-comint-in-buffer ,buffer-name buffer ,command nil ,args))
305+
(pop-to-buffer buffer)))))
306+
#+end_src
307+
294308
*** Display
295309
#+begin_src emacs-lisp :tangle yes
296310
(defun display-ctrl-M-as-newline ()
@@ -3108,6 +3122,8 @@ Elm and elm-mode seems unmaintained at the moment, so I disable this.
31083122
:hook
31093123
(go-ts-mode-hook . eglot-ensure)
31103124
(go-ts-mode-hook . go-ts-mode-set-devdocs)
3125+
:preface
3126+
(define-repl go-repl "Go REPL" "gore")
31113127
:config
31123128
(defun go-ts-mode-set-devdocs ()
31133129
(setq-local devdocs-current-docs '("go")))
@@ -3117,6 +3133,9 @@ Elm and elm-mode seems unmaintained at the moment, so I disable this.
31173133
(with-eval-after-load 'apheleia
31183134
(cl-pushnew '(go-ts-mode . goimports) apheleia-mode-alist :test #'equal))
31193135

3136+
(with-eval-after-load 'repl-toggle
3137+
(cl-pushnew '(go-ts-mode . go-repl) rtog/mode-repl-alist :test #'equal))
3138+
31203139
(cl-pushnew '("\\([^/]+\\)\\.go\\'" "\\1_test.go") find-sibling-rules :test #'equal)
31213140
(cl-pushnew '("\\([^/]+\\)_test\\.go\\'" "\\1.go") find-sibling-rules :test #'equal))
31223141
#+end_src
@@ -3134,17 +3153,6 @@ Elm and elm-mode seems unmaintained at the moment, so I disable this.
31343153
("C-. t t" . go-test-current-test)))
31353154
#+end_src
31363155

3137-
**** gorepl-mode
3138-
#+begin_src emacs-lisp :tangle yes
3139-
(use-package gorepl-mode
3140-
:ensure t
3141-
:hook
3142-
(go-ts-mode-hook . gorepl-mode)
3143-
:init
3144-
(with-eval-after-load 'repl-toggle
3145-
(cl-pushnew '(go-ts-mode . gorepl-run) rtog/mode-repl-alist :test #'equal)))
3146-
#+end_src
3147-
31483156
** groovy
31493157
#+begin_src emacs-lisp :tangle yes
31503158
(use-package groovy-mode
@@ -3400,7 +3408,7 @@ Pretty check-boxes
34003408
(nix-ts-mode-hook . nix-ts-mode-set-devdocs)
34013409
:init
34023410
(with-eval-after-load 'apheleia
3403-
(cl-pushnew '(nix-mode . nix) apheleia-mode-alist :test #'equal))
3411+
(cl-pushnew '(nix-ts-mode . nix) apheleia-mode-alist :test #'equal))
34043412
(with-eval-after-load 'grugru
34053413
(grugru-define-on-major-mode 'nix-mode 'symbol '("true" "false")))
34063414
(with-eval-after-load 'repl-toggle
@@ -4284,7 +4292,6 @@ I am trying to reduce the amount of custom keybindings, therefore I present a ta
42844292
- fish-mode
42854293
- flymake-racket
42864294
- focus
4287-
- gorepl-mode
42884295
- gotest
42894296
- gradle-mode
42904297
- groovy-mode

lock/flake.lock

-51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lock/flake.nix

-18
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,6 @@
329329
repo = "gntp.el";
330330
type = "github";
331331
};
332-
gorepl-mode = {
333-
flake = false;
334-
owner = "manute";
335-
repo = "gorepl-mode";
336-
type = "github";
337-
};
338332
gotest = {
339333
flake = false;
340334
owner = "nlamirault";
@@ -407,12 +401,6 @@
407401
repo = "hl-todo";
408402
type = "github";
409403
};
410-
hydra = {
411-
flake = false;
412-
owner = "abo-abo";
413-
repo = "hydra";
414-
type = "github";
415-
};
416404
idle-highlight-mode = {
417405
flake = false;
418406
type = "git";
@@ -514,12 +502,6 @@
514502
repo = "log4e";
515503
type = "github";
516504
};
517-
lv = {
518-
flake = false;
519-
owner = "abo-abo";
520-
repo = "hydra";
521-
type = "github";
522-
};
523505
magit = {
524506
flake = false;
525507
owner = "magit";

0 commit comments

Comments
 (0)