Skip to content

provide context in the form of unchanged lines or AST nodes #744

Description

@ds-cbo

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions