Documentation
¶
Overview ¶
contains modified code from gopls/internal/golang/workspace_symbol.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComboMatcher ¶
type ComboMatcher []MatcherFunc
type MatcherFunc ¶
A MatcherFunc returns the index and score of a symbol match.
See the comment for symbolCollector for more information.
func MatchExact ¶
func MatchExact(exact string) MatcherFunc
func NewFuzzyMatcher ¶
func NewFuzzyMatcher(query string) MatcherFunc
func ParseQuery ¶
func ParseQuery(q string, newMatcher func(string) MatcherFunc) MatcherFunc
ParseQuery parses a field-separated symbol query, extracting the special characters listed below, and returns a matcherFunc corresponding to the AND of all field queries.
Special characters:
^ match exact prefix $ match exact suffix ' match exact
In all three of these special queries, matches are 'smart-cased', meaning they are case sensitive if the symbol query contains any upper-case characters, and case insensitive otherwise.
func SmartCase ¶
func SmartCase(q string, m MatcherFunc) MatcherFunc
SmartCase returns a matcherFunc that is case-sensitive if q contains any upper-case characters, and case-insensitive otherwise.
type SymbolInformation ¶
type SymbolStore ¶
type SymbolStore[T any] interface { Store(SymbolInformation[T]) TooLow(float64) bool Results() []protocol.SymbolInformation }
func NewSymbolStore ¶
func NewSymbolStore[T any](resolver func(SymbolInformation[T]) (protocol.SymbolInformation, bool)) SymbolStore[T]