Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ jobs:
run: cargo test
- name: Release build
run: cargo build --release
- name: Check config schema is up to date
if: matrix.os == 'ubuntu-latest'
run: cargo run --release -- config-schema | diff - docs/public/config-schema.json
108 changes: 91 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
nu-ansi-term = "0.50"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
unicode-width = "0.2"
schemars = "1"

# Terminal-width detection for `$fill` right-alignment. Unix only: the statusline
# child has no tty of its own, so we walk up to an ancestor's controlling tty and
Expand Down
10 changes: 10 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ CShip is configured via a TOML file. The config discovery order is:

The recommended file is `~/.config/cship.toml`.

## Editor Schema

Add a `$schema` key to get autocomplete and validation for the `[cship]` section in editors that support JSON Schema for TOML (e.g. VS Code's [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml)):

```toml
"$schema" = 'https://cship.dev/config-schema.json'
```

Run `cship config-schema` to print the same schema locally.

## Layout

The `[cship]` section controls the overall layout:
Expand Down
Loading