Skip to main content

Module languages

Module languages 

Source
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 SymbolKind numeric values (as defined in the Language Server Protocol specification version 3.17, §3.15.1).

Structs§

CallConfig
Configuration for extracting function calls from a language.
LangConfig
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 block AST node.
is_go_language
Check whether a tree_sitter::Language is the Go grammar.
is_hcl_language
Check whether a tree_sitter::Language is the HCL grammar.
is_python_language
Check whether a tree_sitter::Language is the Python grammar.
is_rust_language
Check whether a tree_sitter::Language is the Rust grammar.
is_sql_language
Check whether a tree_sitter::Language is the SQL grammar (tree-sitter-sequel).
lsp_symbol_kind_for_decorated_definition
Resolve the LSP SymbolKind for a decorated_definition tree-sitter node given its first decorator name.
lsp_symbol_kind_for_node
Map a tree-sitter Node to an LSP SymbolKind numeric value.
lsp_symbol_kind_for_node_kind
Map a tree-sitter node kind string to an LSP SymbolKind numeric value.