Upstream Parsers
Difftastic uses the following tree-sitter parsers:
Language | Git Repository |
---|---|
Bash | tree-sitter/tree-sitter-bash |
C | tree-sitter/tree-sitter-c |
C++ | tree-sitter/tree-sitter-cpp |
C# | tree-sitter/tree-sitter-c-sharp |
Clojure | sogaiu/tree-sitter-clojure |
Common Lisp | theHamsta/tree-sitter-commonlisp |
CSS | tree-sitter/tree-sitter-css |
Dart | UserNobody14/tree-sitter-dart |
Elixir | elixir-lang/tree-sitter-elixir |
Emacs Lisp | wilfred/tree-sitter-elisp |
Go | tree-sitter/tree-sitter-go |
Haskell | tree-sitter/tree-sitter-haskell |
Janet | sogaiu/tree-sitter-janet-simple |
Java | tree-sitter/tree-sitter-java |
JavaScript, JSX | tree-sitter/tree-sitter-javascript |
JSON | tree-sitter/tree-sitter-json |
Lua | nvim-treesitter/tree-sitter-lua |
Nix | cstrahan/tree-sitter-nix |
OCaml | tree-sitter/tree-sitter-ocaml |
PHP | tree-sitter/tree-sitter-php |
Python | tree-sitter/tree-sitter-python |
Ruby | tree-sitter/tree-sitter-ruby |
Rust | tree-sitter/tree-sitter-rust (forked) |
Scala | tree-sitter/tree-sitter-scala |
TypeScript, TSX | tree-sitter/tree-sitter-typescript |
Updating a parser
To update a parser, pull commits from the upstream git repository. For example, the following command will update the Java parser:
$ git subtree pull --prefix=vendor/tree-sitter-java git@github.com:tree-sitter/tree-sitter-java.git master
To see when each parser was last updated, use the following shell command:
$ for d in $(git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort); do echo "$d"; git log --pretty=" %cs" -n 1 $d; done