Skip to content
lambda-symbolicsPublic

About

A syntax highlighting library for CL

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

ColorLisp

ColorLisp is a style-neutral syntax-highlighting library for Common Lisp applications. It parses source with pinned Tree-sitter grammars and returns semantic spans or complete text segments. The caller decides how categories such as :keyword, :string, and :comment look.

(colorlisp:highlight-segments "(defun greet (name) (format t \"Hi, ~A\" name))"
                              :language :common-lisp)

Language detection accepts a pathname and, for extensionless scripts, an optional shebang. Explicit language selection accepts the canonical names and common aliases.

Supported languages:

  • Common Lisp, Scheme, Clojure
  • Haskell, OCaml, OCaml interfaces
  • Rust, C, C++
  • Python, Go, Ruby, Java, Lua
  • JavaScript, TypeScript, TSX
  • shell, TOML, JSON, YAML
  • Markdown, HTML, CSS, Nix

ColorLisp builds one private native library in the XDG cache on first use. A packager can ship native/libcolorlisp-tree-sitter.so beside the system, or set COLORLISP_NATIVE_LIBRARY to a packaged copy.

./script/bootstrap
./script/check
./script/check --fix

./script/check runs the tests, then checks the source with cheque as cheque.sexp configures it. --fix skips the tests and repairs what cheque can repair. cheque and its tools are development dependencies: checks/qlfile lists them, and the check installs them on first use into ~/.cache/cheque/tools/.

ColorLisp is licensed under the ISC license. Vendored components keep their own licenses in vendor/licenses/. Exact revisions are recorded in vendor/README.org.

Part of the Lambda Symbolics library shelf.

About

A syntax highlighting library for CL

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages