#lisp #parser #incremental #syntax-highlighting

tree-sitter-commonlisp

Common Lisp grammar for the tree-sitter parsing library

5 releases

0.3.3 Apr 6, 2024
0.3.2 Apr 1, 2024
0.3.1 Aug 25, 2023
0.3.0 Dec 6, 2021
0.2.0 Jun 16, 2021

#206 in Text editors

Download history 29/week @ 2024-02-23 13/week @ 2024-03-01 3/week @ 2024-03-08 2/week @ 2024-03-15 173/week @ 2024-03-29 164/week @ 2024-04-05

339 downloads per month
Used in tree-painter

MIT license

6MB
219K SLoC

C 219K SLoC JavaScript 360 SLoC // 0.0% comments Rust 31 SLoC // 0.5% comments Scheme 20 SLoC // 0.8% comments

tree-sitter-commonlisp

CI discord matrix npm crates pypi

WIP. Goal is to have a better syntax highlighting for Neovim and some semantic refactoring https://github.com/nvim-treesitter/nvim-treesitter-refactor/.

All praise goes to https://github.com/sogaiu/tree-sitter-clojure which is extended by this grammar.

TODOs:

  • support number literatls that are different from clojure (e.g. .9)

Macros with special respresentation in syntax tree (when written with lowercase letters):

  • defun and friends (e.g. defmethod)
  • loop macro

This grammar is used in https://github.com/Wilfred/difftastic to generate syntax-ware diffs for Common Lisp.

Dependencies

~2.7–4MB
~71K SLoC