From fb05ee369f2f15a882c1e5056131ee3ca9c25c38 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Mon, 7 Aug 2023 03:38:30 +1000 Subject: [PATCH 1/2] feat(doc): mention JSON schema --- docs/Config.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Config.md b/docs/Config.md index 447ccae5f..7a74a9b54 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -16,6 +16,15 @@ If you want to change the config directory: - MacOS: `export XDG_CONFIG_HOME="$HOME/.config"` +JSON schema is available for `config.yml` so that IntelliSence is automatically +enabled in `**/lazygit/config.yml` files when [YAML Red Hat][yaml] extension is +installed. Note that you always can [override][settings] the default schema +applied to `config.yml` if you need some specific features to make your workflow +faster. + +[yaml]: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml +[settings]: https://github.com/redhat-developer/vscode-yaml#associating-a-schema-to-a-glob-pattern-via-yamlschemas + ## Default ```yaml From f32fe84c9b0a63f573c6afc0c8a3d1352a0dee8c Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Mon, 7 Aug 2023 18:27:37 +1000 Subject: [PATCH 2/2] feat(doc): better JSON schema usage explanation --- docs/Config.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/Config.md b/docs/Config.md index 7a74a9b54..c9b87ea0a 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -16,11 +16,17 @@ If you want to change the config directory: - MacOS: `export XDG_CONFIG_HOME="$HOME/.config"` -JSON schema is available for `config.yml` so that IntelliSence is automatically -enabled in `**/lazygit/config.yml` files when [YAML Red Hat][yaml] extension is -installed. Note that you always can [override][settings] the default schema -applied to `config.yml` if you need some specific features to make your workflow -faster. +JSON schema is available for `config.yml` so that IntelliSense in Visual Studio Code +(completion and error checking) is automatically enabled when the [YAML Red Hat][yaml] +extension is installed. However, note that automatic schema detection only works +if your config file is in one of the standard paths mentioned above. If you +override the path to the file, you can still make IntelliSense work by adding + +```yaml +# yaml-language-server: $schema=https://json.schemastore.org/lazygit.json +``` + +to the top of your config file or via [Visual Studio Code settings.json config][settings]. [yaml]: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml [settings]: https://github.com/redhat-developer/vscode-yaml#associating-a-schema-to-a-glob-pattern-via-yamlschemas