pub fn docstring_of(side: &Source, body: &Region, plugin: &str) -> Option<u32>Expand description
The id of the docstring of body, a function body fold on side, as
plugin’s queries tag it (<plugin>:docstring, from
plugins/shared/queries/<language>-docstrings.scm): the body’s first
fold child when it starts where the body does (Python), or else the fold
just before the body in document order, with
only a signature’s worth of lines between them. The search runs back
through the body’s siblings and then out through the folds that enclose
it, so a fold wrapping the whole function (another plugin’s scope) does
not hide the docstring above it; it stops at a fold carrying one of
plugin’s own tags, such as the body of an enclosing function. A plugin
that collapses a body links it to its docstring, so the two open and
close together.