From a1917275cdf4df5a1a744681651cb64db6e0f559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Gonz=C3=A1lez=20Prieto?= Date: Mon, 16 Mar 2026 15:37:23 +0100 Subject: [PATCH] Add syntax mappings for GCloud CLI config files > .boto => INI I was uninstalling gcloud-cli and the docs said to review the contents of ~/.boto [^1]. `bat` doesn't recognize it but it's just an INI-like file to configure gsutil [^2]. I took the chance to add a few more mappings for other GCloud config files without extension... > .gcloudignore => Git Ignore This one's self-explanatory, but it's documented in [^3]. Makes me wonder if we could just do a blanket `Git Ignore = ".?*ignore"` for every kind of ignore file. For instance, `bat` doesn't catch .dockerignore either. > **/gcloud/configurations/config_* => INI These are configuration files for each different profile you have configured for the gcloud-cli [^4]. They're named like "config_default" or "config_", without a file extension, but they are also INI syntax [^5][^6]. [^1]: https://docs.cloud.google.com/sdk/docs/uninstall-cloud-sdk [^2]: https://docs.cloud.google.com/storage/docs/boto-gsutil [^3]: https://docs.cloud.google.com/sdk/gcloud/reference/topic/gcloudignore [^4]: https://docs.cloud.google.com/sdk/docs/configurations [^5]: https://stackoverflow.com/questions/74290882/return-active-gcp-project-name-programatically-for-both-local-dev-and-deployed-c/7^4292151#74292151 [^6]: https://stackoverflow.com/questions/49212350/where-does-gcloud-store-its-defaults/49256835#49256835 --- CHANGELOG.md | 1 + src/syntax_mapping/builtins/common/50-gcloud-cli-config.toml | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 src/syntax_mapping/builtins/common/50-gcloud-cli-config.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index bd979d14..23e4a29d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Don't color strings inside CSV files, to make it easier to tell which column they belong to, see #3521 (@keith-hall) - Add syntax highlighting support for COBOL, see #3584 (@adukhan99) - Fixed manpage syntax so that ANSI escape codes don't get incorrectly highlighted and thus broken, see #3586 (@BlueElectivire) +- Map several Google Cloud CLI config files to their appropriate syntax #3635 (@victor-gp) ## Themes diff --git a/src/syntax_mapping/builtins/common/50-gcloud-cli-config.toml b/src/syntax_mapping/builtins/common/50-gcloud-cli-config.toml new file mode 100644 index 00000000..ea3eec67 --- /dev/null +++ b/src/syntax_mapping/builtins/common/50-gcloud-cli-config.toml @@ -0,0 +1,3 @@ +[mappings] +"INI" = [".boto", "**/gcloud/configurations/config_*"] +"Git Ignore" = [".gcloudignore"]