Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .agents/skills/segment-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Options are declared as `options.Option` string constants in the segment's `cons
```go
const (
BranchIcon options.Option = "branch_icon" // option name used in config
FetchStatus options.Option = "fetch_status"
NativeStatus options.Option = "native_status"
)
```

Expand All @@ -53,7 +53,6 @@ segments without appearing in a segment-specific `const` block:

| Option name | Type | Default |
| ----------- | ---- | ------- |
| `fetch_version` | `boolean` | varies |
| `always_enabled` | `boolean` | `false` |
| `display_default` | `boolean` | `true` |
| `display_error` | `boolean` | `true` |
Expand Down
7 changes: 7 additions & 0 deletions src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ type Config struct {
AutoUpgrade bool `json:"-" toml:"-" yaml:"-"`
EnableCursorPositioning bool `json:"enable_cursor_positioning,omitempty" toml:"enable_cursor_positioning,omitempty" yaml:"enable_cursor_positioning,omitempty"`
MigrateGlyphs bool `json:"-" toml:"-" yaml:"-"`
// FieldSetsVersion records which analyzer generation stamped this
// config's segments with their template field sets (see
// fieldSetAnalysisVersion); zero means unstamped. Exported, and kept out
// of every config format, so the session cache's gob round trip carries
// the marker and restored configs skip re-analysis exactly when their
// stamps are current.
FieldSetsVersion int `json:"-" toml:"-" yaml:"-"`
}

func (cfg *Config) MakeColors(env runtime.Environment) color.String {
Expand Down
18 changes: 3 additions & 15 deletions src/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const (
// Mirror segment option keys locally rather than importing segments,
// which drags its full transitive dep tree into the wasm build.
branchTemplate options.Option = "branch_template"
fetchStatus options.Option = "fetch_status"
fetchUpstreamIcon options.Option = "fetch_upstream_icon"
homeEnabled options.Option = "home_enabled"
fetchPackageManager options.Option = "fetch_package_manager"
displayMode options.Option = "display_mode"
Expand Down Expand Up @@ -85,9 +83,7 @@ func Default(configError error) *Config {
"{{ if gt .Ahead 0 }}p:white{{ end }}",
},
Options: options.Map{
branchTemplate: "{{ trunc 25 .Branch }}",
fetchStatus: true,
fetchUpstreamIcon: true,
branchTemplate: "{{ trunc 25 .Branch }}",
},
Template: " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", //nolint:lll
},
Expand Down Expand Up @@ -137,9 +133,6 @@ func Default(configError error) *Config {
Foreground: paletteBlue,
Background: backgroundTransparent,
Template: "\ue626 ",
Options: options.Map{
options.FetchVersion: false,
},
},
{
Type: PYTHON,
Expand All @@ -148,9 +141,8 @@ func Default(configError error) *Config {
Background: backgroundTransparent,
Template: "\ue235 ",
Options: options.Map{
options.FetchVersion: false,
displayMode: "files",
fetchVirtualEnv: false,
displayMode: "files",
fetchVirtualEnv: false,
},
},
{
Expand Down Expand Up @@ -278,10 +270,6 @@ func statuslineCLIConfig(hash uint64, segmentType SegmentType, template string)
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}",
"{{ if or (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}",
},
Options: options.Map{
fetchStatus: true,
fetchUpstreamIcon: false,
},
Template: " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ nospace .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ", //nolint:lll
},
{
Expand Down
Loading
Loading