This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

FragmentOptions Pennington.TreeSitter.Fragments

Per-reference extraction flags parsed from a :symbol info-string.

Properties

BodyOnly bool
Emit only the declaration's body, stripping the signature and enclosing braces.
Default FragmentOptions
The default: full declaration text, no imports, no elision.
IncludeImports bool
Prepend the file's top-of-file import/using/require statements to the fragment.
SignaturesOnly bool
Render the node with member bodies replaced by an elision marker (outline view).

Pennington.TreeSitter.Fragments.FragmentOptions

namespace Pennington.TreeSitter.Fragments;

/// Per-reference extraction flags parsed from a :symbol info-string.
public record FragmentOptions
{
    /// Emit only the declaration's body, stripping the signature and enclosing braces.
    
public bool BodyOnly { get; set; }
/// The default: full declaration text, no imports, no elision.
public static FragmentOptions Default { get; }
/// Prepend the file's top-of-file import/using/require statements to the fragment.
public bool IncludeImports { get; set; }
/// Render the node with member bodies replaced by an elision marker (outline view).
public bool SignaturesOnly { get; set; }
}