#tree-sitter #search #codebase #query #syntax #io #language

app tsearch

Search codebase using treesitter query syntax

2 releases

0.1.10 Apr 17, 2023
0.1.3 Apr 17, 2023

#32 in #codebase

21 downloads per month

MIT license

13KB
174 lines

tsearch

Search codebase using treesitter query syntax.

Inspired by https://johnaustin.io/articles/2022/blazing-fast-structural-search-for-c-sharp-in-rust.

Supported Languages

  • Typescript & TSX
  • Rust

CLI

tsearch -q -p path_to_code -- "((identifier) @name (#eq? @name \"App\"))"

VIM Plugin

Requires Vim8+. Neovim not supported.

Plug 'prabirshrestha/tsearch'

To start searching use :TSearch ((identifier) @name (#eq? @name "App")). To cancel search use :TSearchCancel.

Development

cargo run -- -q -p d:\path_to_code -- "((identifier) @name (#eq? @name \"App\"))"

LICENSE

MIT

Dependencies

~42MB
~1M SLoC