import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { taglist } = fn;
Returns a List
of tags matching the regular expression {expr}.
If {filename} is passed it is used to prioritize the results
in the same way that :tselect
does. See tag-priority
.
{filename} should be the full path of the file.
Each list item is a dictionary with at least the following
entries:
name Name of the tag.
filename Name of the file where the tag is
defined. It is either relative to the
current directory or a full path.
cmd Ex command used to locate the tag in
the file.
kind Type of the tag. The value for this
entry depends on the language specific
kind values. Only available when
using a tags file generated by
Universal/Exuberant ctags or hdrtag.
static A file specific tag. Refer to
static-tag
for more information.
More entries may be present, depending on the content of the
tags file: access, implementation, inherits and signature.
Refer to the ctags documentation for information about these
fields. For C code the fields "struct", "class" and "enum"
may appear, they give the name of the entity the tag is
contained in.
The ex-command "cmd" can be either an ex search pattern, a line number or a line number followed by a byte number.
If there are no matching tags, then an empty list is returned.
To get an exact tag match, the anchors '^' and '$' should be
used in {expr}. This also make the function work faster.
Refer to tag-regexp
for more information about the tag
search regular expression pattern.
Refer to 'tags'
for information about how the tags file is
located by Vim. Refer to tags-file-format
for the format of
the tags file generated by the different ctags tools.
Can also be used as a method
:
GetTagpattern()->taglist()