Documentation
¶
Index ¶
- Variables
- func AfterStrings(value string, a string) string
- func BetweenStrings(value string, a string, b string) string
- func BuildHoverResponse(value string, wordRange lsp.Range) *lsp.Hover
- func ConcatMultipleSlices[T any](slices [][]T) []T
- func GetPositionOfNode(node *yamlv3.Node, query []string) (lsp.Position, error)
- func IndexToPosition(index int, content []byte) protocol.Position
- func PointToPosition(point sitter.Point) lsp.Position
- func PositionToIndex(pos protocol.Position, content []byte) int
- func PositionToPoint(position lsp.Position) sitter.Point
- func WordAt(str string, index int) string
- type HelmlsConfiguration
- type ValuesFilesConfig
- type YamlPath
- type YamllsConfiguration
- type YamllsSchemaStoreSettings
- type YamllsSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = HelmlsConfiguration{ LogLevel: "info", ValuesFilesConfig: ValuesFilesConfig{ MainValuesFileName: "values.yaml", LintOverlayValuesFileName: "values.lint.yaml", AdditionalValuesFilesGlobPattern: "values*.yaml", }, YamllsConfiguration: YamllsConfiguration{ Enabled: true, Path: "yaml-language-server", DiagnosticsLimit: 50, ShowDiagnosticsDirectly: false, YamllsSettings: DefaultYamllsSettings, }, }
View Source
var DefaultYamllsSettings = YamllsSettings{ Schemas: map[string]string{"kubernetes": "templates/**"}, Completion: true, Hover: true, YamllsSchemaStoreSettings: YamllsSchemaStoreSettings{ Enable: true, URL: "https://www.schemastore.org/api/json/catalog.json", }, }
Functions ¶
func AfterStrings ¶
AfterStrings gets the substring after a string.
func BetweenStrings ¶
BetweenStrings gets the substring between two strings.
func BuildHoverResponse ¶ added in v0.0.8
func ConcatMultipleSlices ¶ added in v0.0.4
func ConcatMultipleSlices[T any](slices [][]T) []T
func GetPositionOfNode ¶ added in v0.0.6
func IndexToPosition ¶ added in v0.0.8
func PositionToIndex ¶ added in v0.0.8
Types ¶
type HelmlsConfiguration ¶ added in v0.0.8
type HelmlsConfiguration struct {
YamllsConfiguration YamllsConfiguration `json:"yamlls,omitempty"`
ValuesFilesConfig ValuesFilesConfig `json:"valuesFiles,omitempty"`
LogLevel string `json:"logLevel,omitempty"`
}
type ValuesFilesConfig ¶ added in v0.0.10
type YamlPath ¶ added in v0.0.6
type YamlPath struct {
TableNames []string
}
func NewYamlPath ¶ added in v0.0.6
func (YamlPath) IsCapabilitiesPath ¶ added in v0.0.6
func (YamlPath) IsChartPath ¶ added in v0.0.6
func (YamlPath) IsFilesPath ¶ added in v0.0.6
func (YamlPath) IsReleasePath ¶ added in v0.0.6
func (YamlPath) IsValuesPath ¶ added in v0.0.6
type YamllsConfiguration ¶ added in v0.0.8
type YamllsConfiguration struct {
Enabled bool `json:"enabled,omitempty"`
Path string `json:"path,omitempty"`
// max diagnostics from yamlls that are shown for a single file
DiagnosticsLimit int `json:"diagnosticsLimit,omitempty"`
// if set to false diagnostics will only be shown after saving the file
// otherwise writing a template will cause a lot of diagnostics to be shown because
// the structure of the document is broken during typing
ShowDiagnosticsDirectly bool `json:"showDiagnosticsDirectly,omitempty"`
YamllsSettings interface{} `json:"config,omitempty"`
}
type YamllsSchemaStoreSettings ¶ added in v0.0.11
type YamllsSettings ¶ added in v0.0.8
type YamllsSettings struct {
Schemas map[string]string `json:"schemas"`
Completion bool `json:"completion"`
Hover bool `json:"hover"`
YamllsSchemaStoreSettings YamllsSchemaStoreSettings `json:"schemaStore"`
}
Click to show internal directories.
Click to hide internal directories.