diff --git a/src/segments/kubectl.go b/src/segments/kubectl.go index a3dc1c4f..d134a6c1 100644 --- a/src/segments/kubectl.go +++ b/src/segments/kubectl.go @@ -90,7 +90,7 @@ func (k *Kubectl) Enabled() bool { } }() - parseKubeConfig := k.props.GetBool(ParseKubeConfig, false) + parseKubeConfig := k.props.GetBool(ParseKubeConfig, true) if parseKubeConfig { return k.doParseKubeConfig() diff --git a/src/segments/language.go b/src/segments/language.go index db17b998..a643d53e 100644 --- a/src/segments/language.go +++ b/src/segments/language.go @@ -128,7 +128,9 @@ func (l *language) Enabled() bool { if len(l.displayMode) == 0 { l.displayMode = l.props.GetString(DisplayMode, DisplayModeFiles) } + l.loadLanguageContext() + switch l.displayMode { case DisplayModeAlways: enabled = true diff --git a/themes/schema.json b/themes/schema.json index 2c981737..95c05480 100644 --- a/themes/schema.json +++ b/themes/schema.json @@ -2100,7 +2100,7 @@ "type": "boolean", "title": "Parse kubeconfig", "description": "Parse kubeconfig files instead of calling out to kubectl to improve performance.", - "default": false + "default": true }, "context_aliases": { "type": "object", diff --git a/website/docs/segments/cli/kubectl.mdx b/website/docs/segments/cli/kubectl.mdx index 93b5f2df..61453c8d 100644 --- a/website/docs/segments/cli/kubectl.mdx +++ b/website/docs/segments/cli/kubectl.mdx @@ -30,12 +30,12 @@ import Config from "@site/src/components/Config.js"; ## Properties -| Name | Type | Default | Description | +| Name | Type | Default | Description | | ------------------ | :-------: | :-----: | ------------------------------------------------------------------------------- | | `display_error` | `boolean` | `false` | show the error context when failing to retrieve the kubectl information | -| `parse_kubeconfig` | `boolean` | `false` | parse kubeconfig files instead of calling out to kubectl to improve performance | +| `parse_kubeconfig` | `boolean` | `true` | parse kubeconfig files instead of calling out to kubectl to improve performance | | `context_aliases` | `object` | | custom context namespace | -| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached | +| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached | ## Template ([info][templates]) @@ -64,6 +64,7 @@ render an empty current namespace using the word "default", you can use somethin ``` {{.Context}} :: {{if .Namespace}}{{.Namespace}}{{else}}default{{end}} ``` + ::: [templates]: /docs/configuration/templates