mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
29 lines
723 B
Go
29 lines
723 B
Go
package docvalues
|
|
|
|
import (
|
|
"strings"
|
|
|
|
protocol "github.com/tliron/glsp/protocol_3_16"
|
|
)
|
|
|
|
type DocumentationValue struct {
|
|
Documentation string
|
|
Value DeprecatedValue
|
|
}
|
|
|
|
func (v DocumentationValue) GetTypeDescription() []string {
|
|
return v.Value.GetTypeDescription()
|
|
}
|
|
|
|
func (v DocumentationValue) DeprecatedCheckIsValid(value string) []*InvalidValue {
|
|
return v.Value.DeprecatedCheckIsValid(value)
|
|
}
|
|
|
|
func (v DocumentationValue) DeprecatedFetchCompletions(line string, cursor uint32) []protocol.CompletionItem {
|
|
return v.Value.DeprecatedFetchCompletions(line, cursor)
|
|
}
|
|
|
|
func (v DocumentationValue) DeprecatedFetchHoverInfo(line string, cursor uint32) []string {
|
|
return strings.Split(v.Documentation, "\n")
|
|
}
|