A tree-sitter based AST difftool to get meaningful semantic diffs

Overview

diffsitter

CI CD crates version GitHub release (latest by date) downloads license

asciicast

Disclaimer

diffsitter is very much a work in progress and nowhere close to production ready (yet). Contributions are always welcome!

Summary

diffsitter creates semantically meaningful diffs that ignore formatting differences like spacing. It does so by computing a diff on the AST (abstract syntax tree) of a file rather than computing the diff on the text contents of the file.

diffsitter uses the parsers from the tree-sitter project to parse source code. As such, the languages supported by this tool are restricted to the languages supported by tree-sitter.

diffsitter supports the following languages:

  • Bash
  • C#
  • C++
  • CSS
  • Go
  • Java
  • OCaml
  • PHP
  • Python
  • Ruby
  • Rust
  • Typescript/TSX
  • HCL

Examples

Take the following files:

a.rs

fn main() {
    let x = 1;
}

fn add_one {
}

b.rs

fn



main

()

{
}

fn addition() {
}

fn add_two() {
}

The standard output from diff will get you:

1,2c1,12
< fn main() {
<     let x = 1;
---
> fn
>
>
>
> main
>
> ()
>
> {
> }
>
> fn addition() {
5c15
< fn add_one {
---
> fn add_two() {

You can see that it picks up the formatting differences for the main function, even though they aren't semantically different.

Check out the output from diffsitter:

test_data/test_1_a.rs -> test_data/test_1_b.rs
==============================================

1:
--
-     let x = 1;

4:
--
- fn add_one {

9:
--
+ }

11:
---
+ fn addition() {

14:
---
+ fn add_two() {

Note: the numbers correspond to line numbers from the original files.

Since it uses the AST to calculate the difference, it knows that the formatting differences in main between the two files isn't a meaningful difference, so it doesn't show up in the diff.

diffsitter has some nice (terminal aware) formatting too:

screenshot of rust diff

It also has extensive logging if you want to debug or see timing information:

screenshot of rust diff with logs

Installation

Published binaries

This project uses Github actions to build and publish binaries for each tagged release. You can download binaries from there if your platform is listed. We publish nightly releases as well as tagged stable releases.

Cargo

You can install using cargo the standard way with cargo install diffsitter.

Homebrew

You can use my tap to install diffsitter:

brew tap afnanenayet/tap
brew install diffsitter
# brew install afnanenayet/tap/diffsitter

Arch Linux (AUR)

@samhh has packaged diffsitter for arch on the AUR. Use your favorite AUR helper to install diffsitter-bin.

Usage

For detailed help you can run diffsitter --help (diffsitter -h provides brief help messages).

You can configure file associations and formatting options for diffsitter using a config file. If a config is not supplied, the app will use the default config, which you can see with diffsitter --cmd dump_default_config. It will look for a config at ${XDG_HOME:-$HOME}/.config/diffsitter/config.json5 on macOS and Linux, and the standard directory for Windows. You can also refer to the sample config.

You can override the default config path by using the --config flag or set the DIFFSITTER_CONFIG environment variable.

Note: the tests for this crate check to make sure the provided sample config is a valid config.

Dependencies

diffsitter is usually compiled as a static binary, so the tree-sitter grammars/libraries are baked into the binary as static libraries. There is an option to build with support for dynamic libraries which will look for shared library files in the user's default library path. This will search for library files of the form libtree-sitter-{lang}.{ext}, where lang is the language that the user is trying to diff and ext is the platform-specific extension for shared library files (.so, .dylib, etc). The user can override the dynamic library file for each language in the config as such:

{
    "grammar": {
        // You can specify the dynamic library names for each language
        "dylib-overrides": {
            // with a filename
            "rust": "libtree-sitter-rust.so",
            // with an absolute path
            "c": "/usr/lib/libtree-sitter-c.so",
            // with a relative path
            "cpp": "../libtree-sitter-c.so",
        },
    }
}

The above excerpt was taken from the sample config.

Questions, Bugs, and Support

If you notice any bugs, have any issues, want to see a new feature, or just have a question, feel free to open an issue or create a discussion post.

If you file an issue, it would be preferable that you include a minimal example and/or post the log output of diffsitter (which you can do by adding the -d/--debug flag).

Contributing

See CONTRIBUTING.md.

Similar Projects

Comments
  • Provide an option to skip building grammars or provide paths to prebuilt ones

    Provide an option to skip building grammars or provide paths to prebuilt ones

    Is your feature request related to a problem?

    Not related to a problem.

    Context

    I'm working on packaging this for the AUR as diffsitter as opposed to diffsitter-bin, which provides a prebuilt binary. Unfortunately I can't do this as cargo insists on building the grammars listed as submodules. The issue is that I've already packaged most of these grammars separately (see here), all of which compile from source.

    Describe the solution you'd like I'd like to see a way to either bypass compiling the grammars or provide a path to a prebuilt one.

    Describe alternatives you've considered As a workaround, I've tried to patch Cargo.toml such that it would not build the grammars, but it hasn't worked.

    enhancement 
    opened by lmartinez-mirror 19
  • [BUG] Subdirectory for grammar rust was not found

    [BUG] Subdirectory for grammar rust was not found

    Describe the bug

    Building diffsitter yields the following error:

    error: failed to run custom build command for `diffsitter v0.7.2 (/usr/pkgsrc/wip/diffsitter/work/diffsitter-0.7.2)`
    
    Caused by:
      process didn't exit successfully: `/usr/pkgsrc/wip/diffsitter/work/diffsitter-0.7.2/target/release/build/diffsitter-b2fc85f3d27f4d0e/build-script-build` (exit status: 1)
      --- stderr
      Error: Subdirectory for grammar rust was not found
    warning: build failed, waiting for other jobs to finish...
    *** Error code 101
    
    Stop.
    

    To Reproduce Steps to reproduce the behavior:

    1. Build diffsitter on NetBSD

    Expected behavior Complete build.

    Log output/screenshots See above

    Platform: OS: NetBSD-9.99.107, Rust-1.65.0

    Additional context Build in offline-mode.

    bug 
    opened by 0323pin 9
  • [BUG] Out of Bounds error while diffing two Terraform files

    [BUG] Out of Bounds error while diffing two Terraform files

    Describe the bug Out of Bounds error while diffing two Terraform files

    To Reproduce Steps to reproduce the behavior:

    1. Configure diffsitter to treat .tf files as hcl.
    {
      "grammar": {
        "file-associations": {
          "tf": "hcl"
        }
      }
    }
    
    1. Create two Terraform files:
    cat <<EOF > test-a.tf
    locals {
    }
    EOF
    
    cat <<EOF > test-b.tf
    locals {
      foo = "foo"
    }
    EOF
    
    1. Diff the two files:
    ❯ diffsitter test-a.tf test-b.tf
    
    1. An error is generated:
    thread 'main' panicked at 'byte index 14 is out of bounds of `  foo = "foo"`', src/formatting.rs:440:43
    

    Expected behavior The diff should be printed without any error.

    Log output/screenshots

    ❯ RUST_BACKTRACE=full diffsitter --debug test-a.tf test-b.tf
     2022-11-16T20:11:09.402Z DEBUG diffsitter > Checking if test-a.tf can be parsed
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Deduced language "hcl" from extension "tf" provided from user mappings
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Using tree-sitter parser for language hcl
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Succeeded loading grammar for hcl
     2022-11-16T20:11:09.402Z DEBUG diffsitter        > Checking if test-b.tf can be parsed
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Deduced language "hcl" from extension "tf" provided from user mappings
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Using tree-sitter parser for language hcl
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Succeeded loading grammar for hcl
     2022-11-16T20:11:09.402Z DEBUG diffsitter        > Extensions for both input files are supported
     2022-11-16T20:11:09.402Z DEBUG diffsitter        > Reading test-a.tf to string
     2022-11-16T20:11:09.402Z INFO  diffsitter        > Will deduce filetype from file extension
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Deduced language "hcl" from extension "tf" provided from user mappings
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Using tree-sitter parser for language hcl
     2022-11-16T20:11:09.402Z INFO  diffsitter::parse > Succeeded loading grammar for hcl
     2022-11-16T20:11:09.402Z DEBUG diffsitter::parse > Constructed parser
     2022-11-16T20:11:09.402Z DEBUG diffsitter::parse > Parsed AST
     2022-11-16T20:11:09.402Z INFO  TimerFinished     > parse::parse_file(), Elapsed=225.133µs
     2022-11-16T20:11:09.403Z DEBUG diffsitter        > Reading test-b.tf to string
     2022-11-16T20:11:09.403Z INFO  diffsitter        > Will deduce filetype from file extension
     2022-11-16T20:11:09.403Z INFO  diffsitter::parse > Deduced language "hcl" from extension "tf" provided from user mappings
     2022-11-16T20:11:09.403Z INFO  diffsitter::parse > Using tree-sitter parser for language hcl
     2022-11-16T20:11:09.403Z INFO  diffsitter::parse > Succeeded loading grammar for hcl
     2022-11-16T20:11:09.403Z DEBUG diffsitter::parse > Constructed parser
     2022-11-16T20:11:09.403Z DEBUG diffsitter::parse > Parsed AST
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > parse::parse_file(), Elapsed=73.527µs
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > ast::from_ts_tree(), Elapsed=18.268µs
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > ast::process(), Elapsed=37.945µs
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > ast::from_ts_tree(), Elapsed=3.375µs
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > ast::process(), Elapsed=9.209µs
     2022-11-16T20:11:09.403Z INFO  TimerFinished     > diff::compute_edit_script(), Elapsed=4.517µs
     2022-11-16T20:11:09.403Z INFO  diffsitter::formatting > Detected terminal width: 104 columns
     2022-11-16T20:11:09.403Z INFO  diffsitter::formatting > Using stack style horizontal for title
     2022-11-16T20:11:09.403Z DEBUG diffsitter::formatting > Printing remaining old hunks
     2022-11-16T20:11:09.403Z DEBUG diffsitter::formatting > Printing remaining new hunks
     2022-11-16T20:11:09.403Z DEBUG diffsitter::formatting > Printing hunk (lines 1 - 1)
     2022-11-16T20:11:09.403Z DEBUG diffsitter::formatting > Title string has length of 3
     2022-11-16T20:11:09.403Z DEBUG diffsitter::formatting > Printing line 1
    thread 'main' panicked at 'byte index 14 is out of bounds of `  foo = "foo"`', src/formatting.rs:440:43
    stack backtrace:
       0:        0x10026b306 - __mh_execute_header
       1:        0x10021093b - __mh_execute_header
       2:        0x1002672e0 - __mh_execute_header
       3:        0x10026ebbb - __mh_execute_header
       4:        0x10026f428 - __mh_execute_header
       5:        0x10026ef24 - __mh_execute_header
       6:        0x10026ee99 - __mh_execute_header
       7:        0x10026ee55 - __mh_execute_header
       8:        0x10036da03 - __mh_execute_header
       9:        0x10036deec - __mh_execute_header
      10:        0x100185de8 - __mh_execute_header
      11:        0x10019468b - __mh_execute_header
      12:        0x1001a9096 - __mh_execute_header
      13:        0x1001ab227 - __mh_execute_header
      14:     0x7ff809791310 - <unknown>
     2022-11-16T20:11:09.404Z INFO  TimerFinished          > formatting::print(), Elapsed=727.907µs
    test-a.tf -> test-b.tf
    ======================
    
    1:
    --
    +   foo = "foo"%
    

    Platform: OS: macOS 13 (Ventura)

    bug 
    opened by bgshacklett 4
  • Handle unknown files gracefully

    Handle unknown files gracefully

    Is your feature request related to a problem? Please describe.

    In this discussion which spanned from https://github.com/afnanenayet/diffsitter/issues/155 it was noted that diffsitter cannot handle files it does not have the grammar for. This is an issue when trying to show diff in a git repository with a mix of supported and unsupported files.

    Describe the solution you'd like It would be nice if diffsitter was able to show diffs the same way that diff shows diff when the files are not supported. I'd be happy even if it only invoked diff in the background

    Describe alternatives you've considered With an intermediary script I guess it could achieve naively this way: diffsitter "$@" || diff "$@". It has been suggested to use .gitattribute for the git case, but this won't scale beyond the git usecase.

    enhancement 
    opened by j-martin 4
  • Docs - Explicitly state where the config file lives

    Docs - Explicitly state where the config file lives

    I'd open a PR for that, but I can't commit on the repo on my local machine (HEAD of main is 0d9dc2ee9a7add7b335d0f9a26300f3c8fdd4342) due to an error:

    error: 'grammars/tree-sitter-bash' does not have a commit checked out
    fatal: updating files failed
    

    It's not a branch, not a tag, and the ref resolves a seemingly empty object. git show --format='%B' grammars/tree-sitter-bash | cat returns nothing (and exit with 0)

    Anyhow this is the change I want to make:

    The ${XDG_HOME:-$HOME} is there because XDG_HOME is not a thing on macOS.' .

    diff --git a/README.md b/README.md
    index 0a5c2d4..40db186 100644
    --- a/README.md
    +++ b/README.md
    @@ -183,9 +183,9 @@ ## Usage
     You can configure file associations and formatting options for `diffsitter`
     using a config file. If a config is not supplied, the app will use the default
     config, which you can see with `diffsitter --cmd dump_default_config`. It will
    -look for a config at `$XDG_HOME/.config` on macOS and Linux, and the standard
    -directory for Windows. You can also refer to the
    -[sample config](/assets/sample_config.json5).
    +look for a config at `${XDG_HOME:-$HOME}/.config/diffsitter/config.json5` on
    +macOS and Linux, and the standard directory for Windows. You can also refer to
    +the [sample config](/assets/sample_config.json5).
     
     *Note: the tests for this crate check to make sure the provided sample config
     is a valid config.*
    diff --git a/assets/sample_config.json5 b/assets/sample_config.json5
    index c4f1c63..f6587fb 100644
    --- a/assets/sample_config.json5
    +++ b/assets/sample_config.json5
    @@ -1,5 +1,7 @@
     // This is a JSON5 file, so you can use comments and trailing commas, which
     // makes it a lot more convenient for configs.
    +// It should be in ${XDG_HOME:-$HOME}/.config/diffsitter/config.json5
    +
     {
         // Set options for terminal formatting here
         "formatting": {
    
    
    opened by j-martin 3
  • Hashicorp Config Language (HCL) support

    Hashicorp Config Language (HCL) support

    This project is super useful and I am trying to work it into my workflow.

    I live in HCL, the language of Terraform, a lot of the time, and it would be awesome to be able to compare HCL changes with this AST-aware method.

    I'm aware the tree-sitter project does not presently support HCL. Should I push an issue up there, and link it here, or something like that?

    enhancement 
    opened by mike-sol 3
  • Latest stable version is missing Windows release

    Latest stable version is missing Windows release

    The latest stable version, 0.7.2 is missing a diffsitter-x86_64-pc-windows-msvc.zip release. As such, the Scoop package is out of date. Could you check this out please? Thanks in advance.

    build 
    opened by tech189 2
  • build(deps): bump log from 0.4.15 to 0.4.16

    build(deps): bump log from 0.4.15 to 0.4.16

    Bumps log from 0.4.15 to 0.4.16.

    Changelog

    Sourced from log's changelog.

    [0.4.16] - 2022-03-22

    • Fix a conflict with unqualified Option use in macros.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • build(deps): bump test-case from 2.0.0 to 2.0.1

    build(deps): bump test-case from 2.0.0 to 2.0.1

    Bumps test-case from 2.0.0 to 2.0.1.

    Release notes

    Sourced from test-case's releases.

    TestCase - v2.0.1

    Bug fixes:

    • matches Pattern if condition parses correctly (if condition part wasn't allowed despite being documented)

    Full Changelog: https://github.com/frondeus/test-case/compare/v2.0.0...v2.0.1

    Changelog

    Sourced from test-case's changelog.

    2.0.1

    Bug fixes

    • matches Pattern if condition parses correctly (if condition part wasn't allowed)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump thiserror from 1.0.26 to 1.0.28

    Bump thiserror from 1.0.26 to 1.0.28

    Bumps thiserror from 1.0.26 to 1.0.28.

    Release notes

    Sourced from thiserror's releases.

    1.0.28

    • Make ? work with error types that hold an optional source (#147)

    1.0.27

    • Support forwarding backtrace method to source's backtrace method (#137, #146, thanks @​astraw)
    Commits
    • b47c75d Release 1.0.28
    • 9af5265 Merge pull request #147 from dtolnay/optionfrom
    • 2a2d172 Support #[from] on an Option field
    • 6159aba Add test of #[from] on optional source
    • b087faf Release 1.0.27
    • 2e2c126 Merge pull request #146 from dtolnay/backtrace
    • 71c7ebe Update documentation of source-backtrace behavior
    • 799bb53 Extract combined backtrace-source case to separate match arm
    • d49c5af Handle backtrace coming from Option source field
    • 2b37b9e Handle enum containing #[source] #[backtrace] field
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Add release tarball with sources including submodules

    Add release tarball with sources including submodules

    The source code tarballs that GitHub automatically generates (e.g. https://github.com/afnanenayet/diffsitter/archive/refs/tags/v0.6.6.tar.gz) don’t include git submodules.

    Can you please pack tarball with all sources, including submodules, as part of the release process? This will make it easier for Linux distributions to package diffsitter.

    enhancement 
    opened by jirutka 2
  • Options to only show functional changes in diffs

    Options to only show functional changes in diffs

    Is your feature request related to a problem? Please describe.

    I noticed that diffsitter returns 0 when the two files have the same AST, which is awesome. However, it still produces output if there are nonfunctional changes. Example programs:

    package main
    
    import "fmt"
    
    func main() {
    	a := "string"
    	fmt.Println(a)
    }
    
    package main
    
    import "fmt"
    
    // comments in the file
    func main() {
    	b := "string"
    	fmt.Println(b)
    }
    

    Produces:

    diffsitter a/main.go b/main.go                                                                                                                      main  
    a/main.go -> b/main.go
    ======================
    
    4:
    --
    + // comments in the file
    
    6 - 7:
    ------
    +       b := "string"
    +       fmt.Println(b)
    
    5 - 6:
    ------
    -       a := "string"
    -       fmt.Println(a)
    

    In the event that you have something like a mass refactor which you expect not to have functional changes, if one ends up showing up you are not easily able to find it.

    Describe the solution you'd like

    I would like it if there were a setting which, when enabled, would make diffsitter print only the changes which meaningfully alter the AST.

    Describe alternatives you've considered

    I thought about writing my own but it would only support Go. This project seems like a great base to bring this to many languages.

    Additional context

    I am not sure but I would suspect the various different semantics between languages may make this a somewhat complicated request (I don't know off the top of my head but I suspect, software being the way it is, that there may exist a language or framework where merely changing a variable name has functional impacts).

    enhancement diff-algo 
    opened by dgunay 5
  • feature request: show output in 2 columns

    feature request: show output in 2 columns

    Any plans to make the output in 2 columns like delta and difftastic?

    In this example, I find the difftastic's version really pretty.

    delta: image

    diffsitter: image

    difftastic: image

    enhancement output 
    opened by bbigras 2
  • Add support for git diff

    Add support for git diff

    Is your feature request related to a problem? Please describe. Tools like https://github.com/jeffkaufman/icdiff are able to act like a git diff viewer. Diffsitter would be exceptionally good for that purpose.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Can be achieve manually via diffsitter <(git show hashA:myFile) <(git show hashB:myFile)

    enhancement 
    opened by j-martin 2
  • Widen language support to all languages supported by tree-sitter

    Widen language support to all languages supported by tree-sitter

    Tree-sitter states that it has "fairly complete" support for 34 languages with 12 more in development.

    Right now this project states its support for 11 languages. Is there a way we can increase this number?

    enhancement good first issue 
    opened by spartanatreyu 12
  • How diffsitter works, How performant it is and What cases are exemplatory good and bad

    How diffsitter works, How performant it is and What cases are exemplatory good and bad

    Difftastic has a complete section dedicated what methods it uses, but has the performance not written in the repo but in the inspired projects: https://github.com/Wilfred/difftastic#how-it-works Could you elaborate what algorithm you use for the diff? A* and dijkstra for graph difference are the most prominent ones, where A* is much more performant on multiple changes (in a function) but has overall worse results.

    Performance of examples (ideally with benchmarks), Known problems and Non-Goals would complete the first impression.

    I am asking due for an evaluation of neovim what to use, but I am not affiliated or core member (only neovim user) and would like to see things moving forward.

    documentation 
    opened by matu3ba 2
Releases(nightly)
Owner
Afnan Enayet
quant research eng at citadel, former @blend, @microsoft, @capitalone
Afnan Enayet
An AST viewer UI for languages with an AST.

AST Viewer UI This project was inspired by "Zoom Out": The missing feature of IDEs. I want to create a GUI with text fields, boxes, arrows, etc. and g

West 3 Dec 22, 2022
Traversal of tree-sitter Trees and any arbitrary tree with a TreeCursor-like interface

tree-sitter-traversal Traversal of tree-sitter Trees and any arbitrary tree with a TreeCursor-like interface. Using cursors, iteration over the tree c

Sebastian Mendez 12 Jan 8, 2023
Like grep, but uses tree-sitter grammars to search

tree-grepper Works like grep, but uses tree-sitter to search for structure instead of strings. Installing This isn't available packaged anywhere. That

Brian Hicks 219 Dec 25, 2022
A syntax highlighter for Node powered by Tree Sitter. Written in Rust.

tree-sitter-highlight A syntax highlighter for Node.js powered by Tree Sitter. Written in Rust. Usage The following will output HTML: const treeSitter

Devon Govett 211 Dec 20, 2022
Tree-sitter - An incremental parsing system for programming tools

tree-sitter Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and effic

null 10.6k Jan 9, 2023
Mypyc DSL grammar for tree-sitter

tree-sitter-mypyc Mypyc DSL grammar for tree-sitter. Installing (Neovim) This is based on the Neovim Tree-sitter docs for adding new parsers. Basicall

dosisod 3 Dec 30, 2022
tree-sitter meets Kakoune

kak-tree-sitter This is a binary server that interfaces tree-sitter with kakoune. Features Install Usage Design Credits Features Semantic highlighting

Dimitri Sabadie 5 May 3, 2023
rehype plugin to use tree-sitter to highlight code in pre code blocks

rehype-tree-sitter rehype plugin to use tree-sitter to highlight code in <pre><code> blocks Contents What is this? When should I use this? Install Use

null 5 Jul 25, 2023
A tool that allows you to modify, edit, and recompile the AST script of Artemis engine.

Artemis AST Script Processor This utility offers a set of Rust functions to parse and manipulate Artemis AST-based scripts. Features Tokenization: Con

xmoe 7 Sep 19, 2023
Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. A tokei/scc/cloc alternative.

tcount (pronounced "tee-count") Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. Quick Start Simply run tcount

Adam P. Regasz-Rethy 48 Dec 7, 2022
As-tree - Print a list of paths as a tree of paths 🌳

as-tree Print a list of paths as a tree of paths. For example, given: dir1/foo.txt dir1/bar.txt dir2/qux.txt it will print: . ├── dir1 │ ├── foo.tx

Jake Zimmerman 396 Dec 10, 2022
Integrate a Rust project with semantic-release

semantic-release-cargo semantic-release-cargo integrates a cargo-based Rust project with semantic-release. This solves two use cases: publishing to cr

null 5 Jan 16, 2023
Split text into semantic chunks, up to a desired chunk size. Supports calculating length by characters and tokens

Large language models (LLMs) can be used for many tasks, but often have a limited context size that can be smaller than documents you might want to use. To use documents of larger length, you often have to split your text into chunks to fit within this context size.

Ben Brandt 4 May 8, 2023
Conference Monitoring Project based on Image Recognition that uses Rust Language and AWS Rekognition service to get the level of image similarity.

Conference Monitoring System based on Image Recognition in Rust This is a Conference Monitoring Project based on Image Recognition that uses Rust Lang

Pankaj Chaudhary 6 Dec 18, 2022
Tree-based TUI chat client

cove Cove is a TUI client for euphoria.io, a threaded real-time chat platform. It runs on Linux, Windows and macOS. Manual installation This section c

null 8 Nov 16, 2022
A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique.

bulloak A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique. Installing cargo install bulloak Usage Basic Us

Alexander González 38 Aug 7, 2023
A CLI utility installed as "ansi" to quickly get ANSI escape sequences. Supports the most basic ones, like colors and styles as bold or italic.

'ansi' - a CLI utility to quickly get ANSI escape codes This Rust project called ansi-escape-sequences-cli provides an executable called ansi which ca

Philipp Schuster 5 Jul 28, 2022
ruborute is an interactive command-line tool to get asphyxia@sdvx gaming data.

ruborute Are you 暴龍天 ?. The ruborute is an interactive command-line tool to get asphyxia@sdvx gaming data. asphyxia-core/plugins: https://github.com/a

RinChanNOW! 9 Sep 28, 2022
Execute Javascript code in the Dioxus, and get the return value ( for Dioxus )

Golde Dioxus Execute Javascript code in the Dioxus, and get the return value. This demo can help use Javascript to calc the + operator formula. use di

YuKun Liu 15 Dec 27, 2022