Documentation
¶
Index ¶
- Variables
- func AfterStrings(value string, a string) string
- func BetweenStrings(value string, a string, b string) string
- func FormatToYAML(field reflect.Value, fieldName string) string
- func GetBoolType(value interface{}) string
- func GetNodeForPosition(node *yamlv3.Node, position lsp.Position) *yamlv3.Node
- func GetPositionOfNode(node *yamlv3.Node, query []string) (lsp.Position, error)
- func GetSubValuesForSelector(values chartutil.Values, selector []string) (map[string]any, error)
- func GetTableOrValueForSelector(values chartutil.Values, selector []string) (string, error)
- func GetValueCompletion(values chartutil.Values, splittedVar []string) []lsp.CompletionItem
- 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 RangeContainsRange(surrounding, including sitter.Range) bool
- func RangeToLocation(URI uri.URI, range_ sitter.Range) lsp.Location
- func RangesToLocations(URI uri.URI, ranges []sitter.Range) (locations []lsp.Location)
- func ReadYamlToNode(data []byte) (node yamlv3.Node, err error)
- func RemoveQuotes(s string) string
- func WordAt(str string, index int) string
- type ErrEmpytArray
- type ErrEmpytMapping
- type HelmLintConfig
- type HelmlsConfiguration
- type ValuesFilesConfig
- 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", }, HelmLintConfig: HelmLintConfig{ Enabled: true, IgnoredMessages: []string{}, }, YamllsConfiguration: YamllsConfiguration{ Enabled: true, EnabledForFilesGlob: "*.{yaml,yml}", EnabledForFilesGlobObject: glob.MustCompile("*.{yaml,yml}"), Path: "yaml-language-server", InitTimeoutSeconds: 3, DiagnosticsEnabled: true, 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 FormatToYAML ¶ added in v0.0.16
func GetBoolType ¶ added in v0.0.16
func GetBoolType(value interface{}) string
func GetNodeForPosition ¶ added in v0.3.0
func GetPositionOfNode ¶ added in v0.0.6
func GetSubValuesForSelector ¶ added in v0.3.0
func GetTableOrValueForSelector ¶ added in v0.0.16
func GetValueCompletion ¶ added in v0.0.16
func GetValueCompletion(values chartutil.Values, splittedVar []string) []lsp.CompletionItem
func IndexToPosition ¶ added in v0.0.8
func PositionToIndex ¶ added in v0.0.8
func RangeContainsRange ¶ added in v0.0.18
func RangeToLocation ¶ added in v0.0.16
func RangesToLocations ¶ added in v0.3.0
func ReadYamlToNode ¶ added in v0.1.0
ReadYamlToNode will parse a YAML file into a yaml Node.
func RemoveQuotes ¶ added in v0.0.16
Types ¶
type ErrEmpytArray ¶ added in v0.0.17
type ErrEmpytArray struct {
Key string
}
func (ErrEmpytArray) Error ¶ added in v0.0.17
func (e ErrEmpytArray) Error() string
type ErrEmpytMapping ¶ added in v0.0.18
type ErrEmpytMapping struct {
Key string
}
func (ErrEmpytMapping) Error ¶ added in v0.0.18
func (e ErrEmpytMapping) Error() string
type HelmLintConfig ¶ added in v0.4.0
type HelmlsConfiguration ¶ added in v0.0.8
type HelmlsConfiguration struct { YamllsConfiguration YamllsConfiguration `json:"yamlls,omitempty"` ValuesFilesConfig ValuesFilesConfig `json:"valuesFiles,omitempty"` HelmLintConfig HelmLintConfig `json:"helmLint,omitempty"` LogLevel string `json:"logLevel,omitempty"` }
type ValuesFilesConfig ¶ added in v0.0.10
type YamllsConfiguration ¶ added in v0.0.8
type YamllsConfiguration struct { Enabled bool `json:"enabled,omitempty"` EnabledForFilesGlob string `json:"enabledForFilesGlob,omitempty"` EnabledForFilesGlobObject glob.Glob Path string `json:"path,omitempty"` InitTimeoutSeconds int `json:"initTimeoutSeconds,omitempty"` DiagnosticsEnabled bool `json:"diagnosticsEnabled,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 any `json:"config,omitempty"` }
func (*YamllsConfiguration) CompileEnabledForFilesGlobObject ¶ added in v0.3.0
func (y *YamllsConfiguration) CompileEnabledForFilesGlobObject()
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.