#lisp #incremental-parser #tree-sitter #parser

tree-sitter-commonlisp

Common Lisp grammar for the tree-sitter parsing library

7 releases

Uses new Rust 2024

0.4.1 Mar 16, 2025
0.4.0 Mar 16, 2025
0.3.3 Apr 6, 2024
0.3.1 Aug 25, 2023
0.2.0 Jun 16, 2021

#88 in Text editors

Download history 6/week @ 2024-12-04 25/week @ 2024-12-11 2/week @ 2025-02-05 9/week @ 2025-02-12 4/week @ 2025-02-19 5/week @ 2025-02-26 219/week @ 2025-03-12 28/week @ 2025-03-19

253 downloads per month
Used in tree-painter

MIT license

6MB
219K SLoC

C 218K SLoC JavaScript 359 SLoC // 0.0% comments Rust 32 SLoC // 0.4% 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 literals 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.

Usage

Dependencies