Diffsitter – A Tree-sitter based AST difftool to get meaningful semantic diffs
10 months ago
- #code-diff
- #tree-sitter
- #developer-tools
- diffsitter is a work in progress tool for creating semantically meaningful diffs by comparing ASTs instead of text content.
- It uses tree-sitter parsers, supporting languages like Bash, C#, C++, CSS, Go, Java, OCaml, PHP, Python, Ruby, Rust, Typescript/TSX, and HCL.
- diffsitter ignores formatting differences, focusing on meaningful changes in code structure.
- Features include configurable node filtering, extensive logging, and terminal-aware formatting.
- Installation options include building from source with cargo, using Homebrew, Alpine Linux packages, or Docker.
- Configuration is done via a JSON5 file, with options to override dynamic library paths for tree-sitter grammars.
- Supports generating shell completion scripts for Bash, Zsh, Fish, Elvish, and Powershell.
- Contributions are welcome, with guidelines provided in CONTRIBUTING.md.