mirror of
https://gitlab.com/vindarel/ciel.git
synced 2026-01-30 12:22:52 -08:00
REPL: highlighting sb-ext -> uiop
This commit is contained in:
parent
f75e29f4c2
commit
fa79625d50
3 changed files with 13 additions and 6 deletions
|
|
@ -151,6 +151,12 @@ Syntax highlighting is currently off by default. To enable it, install
|
|||
;; (setf *pygmentize-options* (list "-s" "-l" "lisp"))
|
||||
#+end_src
|
||||
|
||||
You can also switch it on and off from the REPL:
|
||||
|
||||
#+BEGIN_SRC lisp
|
||||
(setf sbcli:*syntax-highlighting* t)
|
||||
#+end_src
|
||||
|
||||
|
||||
# update the TOC with toc-org
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
(defpackage :sbcli
|
||||
(:use :common-lisp :cffi :trivial-package-local-nicknames)
|
||||
(:export sbcli help what *repl-version* *repl-name* *prompt* *prompt2* *ret* *config-file*
|
||||
*hist-file* *special* *last-result*))
|
||||
*hist-file* *special* *last-result*
|
||||
*syntax-highlighting* *pygmentize* *pygmentize-options*))
|
||||
|
||||
(in-package :sbcli)
|
||||
|
||||
|
|
|
|||
10
utils.lisp
10
utils.lisp
|
|
@ -32,11 +32,11 @@ bar:qux
|
|||
(which:which "pygmentize"))))
|
||||
(when pygmentize
|
||||
(with-input-from-string (s str)
|
||||
(let ((proc (sb-ext:run-program pygmentize
|
||||
*pygmentize-options*
|
||||
:input s
|
||||
:output :stream)))
|
||||
(read-line (sb-ext:process-output proc) nil "")))))
|
||||
(let ((proc (uiop:launch-program (alexandria:flatten
|
||||
(list pygmentize *pygmentize-options*))
|
||||
:input s
|
||||
:output :stream)))
|
||||
(read-line (uiop:process-info-output proc) nil "")))))
|
||||
str))
|
||||
|
||||
(defun syntax-hl ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue