fix(javascript): use nodejs-repl-send-* commands

Now, +eval/send-region-to-repl or +eval:region/+eval:buffer will
communicate with the REPL via nodejs-repl's API, instead of feeding the
selection to the REPL line-by-line (the fallback method).
This commit is contained in:
Henrik Lissner 2026-03-04 20:16:15 -05:00
parent d23abed66d
commit 974e45dfd3
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -11,7 +11,9 @@
(defun +javascript-common-config (mode)
(unless (eq mode 'nodejs-repl-mode)
(set-repl-handler! mode #'+javascript/open-repl)
(set-repl-handler! mode #'+javascript/open-repl
:send-region #'nodejs-repl-send-region
:send-buffer #'nodejs-repl-send-buffer)
(set-electric! mode :chars '(?\} ?\) ?. ?:))
(set-ligatures! mode
;; Functional