feat: include schema declaration in themes

This commit is contained in:
TravisTX 2020-12-31 05:28:53 -07:00 committed by Jan De Dobbeleer
parent 11350c7347
commit dbe3fa1bcc
21 changed files with 20 additions and 17 deletions

View file

@ -329,21 +329,6 @@ and store it somehwere. Once adjusted to your liking, [change the prompt setting
oh-my-posh --config ~/.mytheme.omp.json
```
#### JSON Schema
There's an easy to use [JSON schema][schema] available to validate your theme and have auto completion when editing.
When using [Visual Studio Code][vscode], you can extend your settings file (F1 -> Preferences: Open Settings (JSON))
by adding the following lines:
```json
"json.schemas": [
{
"fileMatch": ["*.omp.json"],
"url": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json"
}
]
```
🎉🎉🎉
[wt]: https://github.com/microsoft/terminal
@ -358,5 +343,3 @@ by adding the following lines:
[brew]: /docs/homebrew
[prompt]: /docs/installation#4-replace-your-existing-prompt
[configuration]: /docs/configure
[schema]: https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json
[vscode]: https://code.visualstudio.com/

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh3/main/themes/schema.json",
"blocks": [
{
"type": "prompt",