afnanenayet / afnanenayet/diffsitter

provide context in the form of unchanged lines or AST nodes

Open
#744 1 comment 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2.4k
Forks
53
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
When using diffsitter as tool for `git diff`, line numbers don't make it immediately obvious where the change occurred.

**Describe the solution you'd like**
It would be nice if some surrounding context (3 lines before, 3 lines after) could be given, similar to how regular `git diff` and `diff -C3` do it.

**Describe alternatives you've considered**
An alternative would be to allow machine-readable types of output (eg. `json`) for me or anyone else to write a new front-end around the logic of diffsitter.

**Additional context**
If it's not as obvious what counts as a line in AST-land, I would also be happy if I could get 10 AST nodes before and 10 AST nodes after the change (or some other configurable amount).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.