mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-19 15:35:28 +02:00
22 lines
469 B
Go
22 lines
469 B
Go
package docvalues
|
|
|
|
import (
|
|
protocol "github.com/tliron/glsp/protocol_3_16"
|
|
)
|
|
|
|
type CustomValue struct {
|
|
FetchValue func() Value
|
|
}
|
|
|
|
func (v CustomValue) GetTypeDescription() []string {
|
|
return []string{"Custom"}
|
|
}
|
|
|
|
func (v CustomValue) CheckIsValid(value string) error {
|
|
return v.FetchValue().CheckIsValid(value)
|
|
}
|
|
|
|
func (v CustomValue) FetchCompletions(line string, cursor uint32) []protocol.CompletionItem {
|
|
return v.FetchValue().FetchCompletions(line, cursor)
|
|
}
|