TreeSitterOptions
Pennington.TreeSitter
Configuration for the Pennington tree-sitter integration.
Properties
ContentRootstring- Base directory that
:symbolfile references resolve against. When null or empty,AddTreeSitterregisters only these options and no services. LanguageConfigsDictionary<string, LanguageDeclarationConfig>- Maps a fence base-language id (e.g.
python,cs) to the declaration config used to resolve member name paths. Seeded with built-in defaults; callers may add or replace entries. WatchFilePatternsISet<string>- File globs watched (recursively) under
ContentRootfor live-reload. Defaults to the source extensions of the built-in languages plus common markup/data formats (HTML, CSS, JSON, Razor) that are embedded whole-file — those need noLanguageConfigsentry because a bare:symbolreference returns the file as-is. Watching by extension keeps most build output from triggering reloads; note*.jsonand*.cscan still match files underbin//obj/, so prefer a focused content root (a dedicated snippets folder) when pointing at a source tree. Add or remove globs to customize.
Methods
ResolveConfig
#public LanguageDeclarationConfig ResolveConfig(string languageId)
Returns the declaration config registered for languageId, or null when none is configured.
Parameters
languageIdstring
Returns
LanguageDeclarationConfigPennington.TreeSitter.TreeSitterOptions
namespace Pennington.TreeSitter;
/// Configuration for the Pennington tree-sitter integration.
public class TreeSitterOptions
{
/// Base directory that :symbol file references resolve against. When null or empty, AddTreeSitter registers only these options and no services.
public string ContentRoot { get; set; }
/// Maps a fence base-language id (e.g. python, cs) to the declaration config used to resolve member name paths. Seeded with built-in defaults; callers may add or replace entries.
public Dictionary<string, LanguageDeclarationConfig> LanguageConfigs { get; }
/// Returns the declaration config registered for languageId, or null when none is configured.
public LanguageDeclarationConfig ResolveConfig(string languageId)
;
/// File globs watched (recursively) under ContentRoot for live-reload. Defaults to the source extensions of the built-in languages plus common markup/data formats (HTML, CSS, JSON, Razor) that are embedded whole-file — those need no LanguageConfigs entry because a bare :symbol reference returns the file as-is. Watching by extension keeps most build output from triggering reloads; note *.json and *.cs can still match files under bin//obj/, so prefer a focused content root (a dedicated snippets folder) when pointing at a source tree. Add or remove globs to customize.
public ISet<string> WatchFilePatterns { get; }
}