Expand description
Language registry mapping file extensions to tree-sitter grammars.
Each supported language has a grammar and a tree-sitter query that extracts function, class, and method definitions. Compiled queries are cached so that repeated calls for the same extension are free.
Modules§
- lsp_
symbol_ kind - LSP
SymbolKindnumeric values (as defined in the Language Server Protocol specification version 3.17, §3.15.1).
Structs§
- Call
Config - Configuration for extracting function calls from a language.
- Lang
Config - Configuration for a supported source language.
Functions§
- call_
query_ for_ extension - Look up the call-extraction query for a file extension.
- config_
for_ extension - Look up the language configuration for a file extension.
- derive_
hcl_ block_ name - Derive the canonical symbol name for an HCL
blockAST node. - is_
go_ language - Check whether a
tree_sitter::Languageis the Go grammar. - is_
hcl_ language - Check whether a
tree_sitter::Languageis the HCL grammar. - is_
python_ language - Check whether a
tree_sitter::Languageis the Python grammar. - is_
rust_ language - Check whether a
tree_sitter::Languageis the Rust grammar. - is_
sql_ language - Check whether a
tree_sitter::Languageis the SQL grammar (tree-sitter-sequel). - lsp_
symbol_ kind_ for_ decorated_ definition - Resolve the LSP
SymbolKindfor adecorated_definitiontree-sitter node given its first decorator name. - lsp_
symbol_ kind_ for_ node - Map a tree-sitter
Nodeto an LSPSymbolKindnumeric value. - lsp_
symbol_ kind_ for_ node_ kind - Map a tree-sitter node kind string to an LSP
SymbolKindnumeric value.