Tree-sitter Tags
Usage
Add this crate, and the language-specific crates for whichever languages you want to parse, to your Cargo.toml
:
[]
= "0.19"
= "0.19"
= "0.19"
Create a tag context. You need one of these for each thread that you're using for tag computation:
use TagsContext;
let context = new;
Load some tagging queries from the queries
directory of some language repositories:
use TagsConfiguration;
let python_config = new.unwrap;
let javascript_config = new.unwrap;
Compute code navigation tags for some source code:
let tags = context.generate_tags;
for tag in tags