config: add Zed editor settings and expand VS Code file associations for chezmoi templates

This commit is contained in:
2026-01-24 15:40:36 -06:00
parent 0a097effba
commit b5ed2d5615
2 changed files with 237 additions and 11 deletions
+123 -11
View File
@@ -1,19 +1,131 @@
{
// .tmpl files are Go templates (see text/template pkg)
// Keep in sync with .zed/settings.json
"files.associations": {
// Shell scripts
"*.sh.tmpl": "shellscript",
"*.bash.tmpl": "shellscript",
"*.zsh.tmpl": "shellscript",
"dot_*rc": "shellscript",
"dot_*rc.tmpl": "shellscript",
"*.sh.tmpl": "shellscript",
".chezmoiignore": "ignore",
"*.nu.tmpl": "nushell",
"*.json.tmpl": "json",
"*.toml.tmpl": "toml",
"*.yaml.tmpl": "yaml",
"*.cfg.tmpl": "ini",
"*.fish.tmpl": "fish",
"*bash_aliases*": "shellscript",
"*dot_profile*": "shellscript",
"*dot_gitconfig*": "ini"
"*dot_bash_profile*": "shellscript",
"*dot_bash_logout*": "shellscript",
"*bash_aliases*": "shellscript",
"*dot_zprofile*": "shellscript",
"*dot_zlogin*": "shellscript",
"*dot_zlogout*": "shellscript",
// Fish shell
"*.fish.tmpl": "fish",
// Nushell
"*.nu.tmpl": "nushell",
// Data formats
"*.json.tmpl": "json",
"*.jsonc.tmpl": "jsonc",
"*.yaml.tmpl": "yaml",
"*.yml.tmpl": "yaml",
"*.toml.tmpl": "toml",
"*.xml.tmpl": "xml",
"*.ini.tmpl": "ini",
"*.cfg.tmpl": "ini",
"*.conf.tmpl": "properties",
// Programming languages
"*.py.tmpl": "python",
"*.js.tmpl": "javascript",
"*.ts.tmpl": "typescript",
"*.lua.tmpl": "lua",
"*.rb.tmpl": "ruby",
"*.go.tmpl": "go",
"*.rs.tmpl": "rust",
// Web/styling
"*.html.tmpl": "html",
"*.css.tmpl": "css",
"*.scss.tmpl": "scss",
"*.less.tmpl": "less",
// Documentation
"*.md.tmpl": "markdown",
"*.rst.tmpl": "restructuredtext",
"*.txt.tmpl": "plaintext",
// Editor configs
"*.vim.tmpl": "viml",
"*.el.tmpl": "lisp",
// Git-related
"*dot_gitconfig*": "ini",
"dot_gitconfig.tmpl": "ini",
"*dot_gitignore*": "ignore",
"*dot_gitattributes*": "gitattributes",
".chezmoiignore": "ignore",
// Chezmoi script prefixes (these are shell scripts)
"modify_*": "shellscript",
"run_*": "shellscript",
"run_once_*": "shellscript",
"run_onchange_*": "shellscript",
"run_before_*": "shellscript",
"run_after_*": "shellscript",
// Chezmoi data files
".chezmoiexternal.yaml": "yaml",
".chezmoiexternal.toml": "toml",
".chezmoiexternal.json": "json",
".chezmoidata.yaml": "yaml",
".chezmoidata.toml": "toml",
".chezmoidata.json": "json",
// SSH
"**/dot_ssh/**/config*": "ssh_config",
"**/private_dot_ssh/**/config*": "ssh_config",
// Systemd units
"*.service.tmpl": "systemd-unit",
"*.timer.tmpl": "systemd-unit",
"*.socket.tmpl": "systemd-unit",
"*.target.tmpl": "systemd-unit",
"*.path.tmpl": "systemd-unit",
"*.mount.tmpl": "systemd-unit",
"*.automount.tmpl": "systemd-unit",
"*.slice.tmpl": "systemd-unit",
// Desktop entries
"*.desktop.tmpl": "desktop",
// Docker
"Dockerfile.tmpl": "dockerfile",
"*.dockerfile.tmpl": "dockerfile",
"docker-compose*.tmpl": "yaml",
// Make/build
"Makefile.tmpl": "makefile",
"*.mk.tmpl": "makefile",
"Justfile.tmpl": "just",
// Environment files
"*.env.tmpl": "dotenv",
"*dot_env*": "dotenv",
// Editor/tool configs
".editorconfig.tmpl": "editorconfig",
"dot_editorconfig*": "editorconfig",
"dot_curlrc*": "properties",
"dot_wgetrc*": "properties",
"dot_wakatime.cfg*": "ini",
// PowerShell
"*.ps1.tmpl": "powershell",
"*.psm1.tmpl": "powershell",
// Misc configs
"*.plist.tmpl": "xml",
"*dot_npmrc*": "ini",
"*dot_yarnrc*": "yaml",
},
// Since we're using the Go template syntax, we don't want formatters to mess with it (https://github.com/microsoft/vscode/issues/35350)
"editor.formatOnSave": false,
@@ -21,5 +133,5 @@
"editor.formatOnType": false,
"notebook.formatOnSave.enabled": false,
"deno.enable": false,
"files.simpleDialog.enable": true
"files.simpleDialog.enable": true,
}
+114
View File
@@ -0,0 +1,114 @@
// Folder-specific settings
// .tmpl files are Go templates (see text/template pkg)
// Keep in sync with .vscode/settings.json
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"file_types": {
// Shell scripts (including chezmoi script prefixes)
"Shell Script": [
"*.sh.tmpl",
"*.bash.tmpl",
"*.zsh.tmpl",
"dot_*rc",
"dot_*rc.tmpl",
"*dot_profile*",
"*dot_bash_profile*",
"*dot_bash_logout*",
"*bash_aliases*",
"*dot_zprofile*",
"*dot_zlogin*",
"*dot_zlogout*",
"modify_*",
"run_*",
"run_once_*",
"run_onchange_*",
"run_before_*",
"run_after_*"
],
// Fish shell
"Fish": ["*.fish.tmpl"],
// Nushell
"Nu": ["*.nu.tmpl"],
// Data formats
"JSON": ["*.json.tmpl", ".chezmoidata.json", ".chezmoiexternal.json"],
"JSONC": ["*.jsonc.tmpl"],
"YAML": ["*.yaml.tmpl", "*.yml.tmpl", ".chezmoidata.yaml", ".chezmoiexternal.yaml", "docker-compose*.tmpl", "*dot_yarnrc*"],
"TOML": ["*.toml.tmpl", ".chezmoidata.toml", ".chezmoiexternal.toml"],
"XML": ["*.xml.tmpl"],
"INI": ["*.ini.tmpl", "*.cfg.tmpl", "*dot_gitconfig*", "dot_gitconfig.tmpl"],
"Properties": ["*.conf.tmpl"],
// Programming languages
"Python": ["*.py.tmpl"],
"JavaScript": ["*.js.tmpl"],
"TypeScript": ["*.ts.tmpl"],
"Lua": ["*.lua.tmpl"],
"Ruby": ["*.rb.tmpl"],
"Go": ["*.go.tmpl"],
"Rust": ["*.rs.tmpl"],
// Web/styling
"HTML": ["*.html.tmpl"],
"CSS": ["*.css.tmpl"],
"SCSS": ["*.scss.tmpl"],
"Less": ["*.less.tmpl"],
// Documentation
"Markdown": ["*.md.tmpl"],
"reStructuredText": ["*.rst.tmpl"],
"Plain Text": ["*.txt.tmpl"],
// Editor configs
"Vim Script": ["*.vim.tmpl"],
"Emacs Lisp": ["*.el.tmpl"],
// Git-related
"Git Ignore": ["*dot_gitignore*", ".chezmoiignore"],
"Git Attributes": ["*dot_gitattributes*"],
// SSH
"SSH Config": ["**/dot_ssh/**/config*", "**/private_dot_ssh/**/config*"],
// Systemd units
"Systemd": [
"*.service.tmpl",
"*.timer.tmpl",
"*.socket.tmpl",
"*.target.tmpl",
"*.path.tmpl",
"*.mount.tmpl",
"*.automount.tmpl",
"*.slice.tmpl"
],
// Desktop entries
"Desktop Entry": ["*.desktop.tmpl"],
// Docker
"Dockerfile": ["Dockerfile.tmpl", "*.dockerfile.tmpl"],
// Make/build
"Make": ["Makefile.tmpl", "*.mk.tmpl"],
"Just": ["Justfile.tmpl"],
// Environment files
"Dotenv": ["*.env.tmpl", "*dot_env*"],
// Editor/tool configs
"EditorConfig": [".editorconfig.tmpl", "dot_editorconfig*"],
// PowerShell
"PowerShell": ["*.ps1.tmpl", "*.psm1.tmpl"],
// Misc configs (as INI)
"INI": ["dot_wakatime.cfg*", "*dot_npmrc*", "dot_curlrc*", "dot_wgetrc*"]
},
// Disable formatting since Go templates can break formatters
"format_on_save": "off"
}