Skip to content

Instantly share code, notes, and snippets.

@13hulk
Last active March 2, 2026 12:33
Show Gist options
  • Select an option

  • Save 13hulk/6bb6ef0e70face2ffb81e06e87e5fa3e to your computer and use it in GitHub Desktop.

Select an option

Save 13hulk/6bb6ef0e70face2ffb81e06e87e5fa3e to your computer and use it in GitHub Desktop.
Zed IDE: Settings

Using Zed IDE for Python? Feel free to use my settings.

Just keep a few things in mind:

  1. Font: I use Fira Code Nerd Font. Make sure it's installed on your system before applying.
  2. AI config: Update the AI model provider and model to match your own setup.
  3. Save behavior: I don't use auto-save — I save manually with Cmd+S. I also have on-save hooks (ruff, isort, black, ty) that may modify your file/buffer unexpectedly. Adjust these if that's not what you want.

Files:

  1. zed-settings-v2.json: Simplified, autopilot mode (Recommended)
  2. zed-settings.json: Fully customized, full control
// Zed settings
// Version: v2
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
// ============================================================
// SESSION & WINDOW BEHAVIOR
// ============================================================
"telemetry": {
"diagnostics": false,
"metrics": false,
},
"edit_predictions": {
"provider": "copilot",
},
"session": {
"trust_all_worktrees": true,
},
"on_last_window_closed": "platform_default",
// ============================================================
// AI AGENT SETTINGS
// ============================================================
"agent_buffer_font_size": 15.0,
"agent": {
"profiles": {},
"favorite_models": [
{
"provider": "copilot_chat",
"model": "claude-opus-4.6",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "gemini-3-flash-preview",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "claude-sonnet-4.6",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "gemini-3-pro-preview",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "gpt-5.2-codex",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "gpt-5.2",
"enable_thinking": false,
},
{
"provider": "copilot_chat",
"model": "grok-code-fast-1",
"enable_thinking": false,
},
],
"inline_assistant_model": {
"provider": "copilot_chat",
"model": "claude-opus-4.6",
},
"play_sound_when_agent_done": true,
"default_profile": "ask",
"single_file_review": true,
"default_model": {
"provider": "copilot_chat",
"model": "claude-opus-4.6",
},
},
// ============================================================
// PANELS & LAYOUT
// ============================================================
"outline_panel": {
"dock": "left",
},
"project_panel": {
"sort_mode": "directories_first",
"indent_guides": { "show": "always" },
"folder_icons": true,
"file_icons": true,
"entry_spacing": "comfortable",
"dock": "right",
},
// ============================================================
// GIT
// ============================================================
"git": {
"inline_blame": { "show_commit_summary": true },
},
// ============================================================
// MINIMAP & SCROLLBAR
// ============================================================
"minimap": { "show": "never" },
"scrollbar": { "show": "auto" },
"scroll_beyond_last_line": "vertical_scroll_margin",
// ============================================================
// LINE NUMBERS & GUTTER
// ============================================================
"relative_line_numbers": "disabled",
"gutter": {
"folds": true,
"min_line_number_digits": 4,
"breakpoints": true,
"runnables": true,
"line_numbers": true,
},
// ============================================================
// CODE INTELLIGENCE
// ============================================================
"show_signature_help_after_edits": true,
"auto_signature_help": true,
"sticky_scroll": { "enabled": true },
"hover_popover_delay": 300,
"colorize_brackets": true,
"unnecessary_code_fade": 0.5,
// ============================================================
// SEARCH & NAVIGATION
// ============================================================
"use_smartcase_search": true,
"double_click_in_multibuffer": "select",
"autoscroll_on_clicks": false,
"expand_excerpt_lines": 3,
// ============================================================
// THEME & ICONS
// ============================================================
"theme": {
"mode": "dark",
"light": "One Light",
"dark": "One Dark",
},
"icon_theme": {
"mode": "system",
"light": "Zed (Default)",
"dark": "Zed (Default)",
},
// ============================================================
// FONTS
// ============================================================
"ui_font_family": "FiraCode Nerd Font",
"ui_font_fallbacks": ["Menlo", "MesloLGL Nerd Font", ".ZedMono"],
"ui_font_features": { "calt": true },
"ui_font_size": 15.0,
"ui_font_weight": 400,
"buffer_font_family": "FiraCode Nerd Font",
"buffer_font_fallbacks": ["Menlo", "MesloLGL Nerd Font", ".ZedMono"],
"buffer_font_features": { "calt": true },
"buffer_font_size": 15.0,
"buffer_font_weight": 400,
"buffer_line_height": { "custom": 2.0 },
// ============================================================
// TABS
// ============================================================
"tabs": {
"git_status": true,
"close_position": "left",
"file_icons": true,
},
// ============================================================
// EDITOR DEFAULTS
// All languages inherit these. Override per-language below.
// ============================================================
"tab_size": 4,
"preferred_line_length": 88,
"indent_guides": {
"enabled": true,
"line_width": 1,
"active_line_width": 2,
"coloring": "indent_aware",
"background_coloring": "disabled",
},
"show_whitespaces": "selection",
"soft_wrap": "editor_width",
"format_on_save": "on",
// Allow prettier for languages that use it (JSON, YAML, Markdown, SQL)
"prettier": { "allowed": true },
// ============================================================
// TERMINAL
// ============================================================
"terminal": {
"dock": "bottom",
"toolbar": { "breadcrumbs": false },
"copy_on_select": true,
"minimum_contrast": 45.0,
"cursor_shape": "bar",
},
// ============================================================
// MCP
// ============================================================
"context_servers": {},
// ============================================================
// LANGUAGES — editor behavior per file type
// Controls: tab size, line length, formatter, format-on-save
// All inherit from EDITOR DEFAULTS above. Only override what differs.
// ============================================================
"languages": {
// Rust — auto-detected LSP: rust-analyzer
// On save: rustfmt (via rust-analyzer)
"Rust": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
// "language_servers": ["rust-analyzer"],
},
// Python — LSPs: pyright (intellisense + types), ruff (lint + format)
// On save: sort imports → auto-fix lint → format (all via ruff)
"Python": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
"language_servers": ["pyright", "ruff"],
"formatter": [
{ "code_action": "source.organizeImports.ruff" },
{ "code_action": "source.fixAll.ruff" },
{ "language_server": { "name": "ruff" } },
],
},
// SQL — formatter: prettier with postgresql grammar
// On save: format (handles PG + standard SQL)
"SQL": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
"formatter": "prettier",
"prettier": {
"plugins": ["prettier-plugin-sql"],
// postgresql grammar handles standard SQL + PG extensions.
// Override per-project for MySQL: "language": "mysql"
"language": "postgresql",
"keywordCase": "upper",
},
},
// CSV / TSV — no formatting (would break structure)
"CSV": {
// "tab_size": 4,
// "preferred_line_length": 100,
"format_on_save": "off",
},
"TSV": {
// "tab_size": 4,
// "preferred_line_length": 100,
"format_on_save": "off",
},
// Markdown — formatter: prettier
// On save: format
"Markdown": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
"formatter": "prettier",
"use_on_type_format": false,
},
// YAML — formatter: prettier. Also used for Docker Compose files.
// Schema validation for docker-compose/github-actions is in lsp section.
// On save: format
"YAML": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
"formatter": "prettier",
},
// JSON / JSONC — formatter: prettier
// On save: format
"JSON": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "format_on_save": "on",
"formatter": "prettier",
},
"JSONC": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "format_on_save": "on",
"formatter": "prettier",
},
// TOML — auto-detected LSP: taplo (formatter config in lsp section)
// On save: format via taplo
"TOML": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "soft_wrap": "editor_width",
// "format_on_save": "on",
},
// Dockerfile — no auto-format
"Dockerfile": {
// "tab_size": 4,
// "preferred_line_length": 88,
"format_on_save": "off",
},
// Make — hard tabs required, no auto-format
"Make": {
// "tab_size": 4,
"format_on_save": "off",
"hard_tabs": true,
},
// Shell Script — auto-detected LSP: bash-language-server
// "Shell Script": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "format_on_save": "on",
// },
// HCL (Terraform) — auto-detected LSP: terraform-ls
// "HCL": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "format_on_save": "on",
// },
// XML
// "XML": {
// "tab_size": 4,
// "preferred_line_length": 88,
// "format_on_save": "on",
// },
},
// ============================================================
// LSP — server configuration (background processes)
// Controls: lint rules, type checking, schemas, formatter settings
// Servers not listed here (json-language-server, terraform-ls,
// bash-language-server, docker-langserver) auto-detect with defaults.
// ============================================================
"lsp": {
// rust-analyzer — Rust language server
// Provides: diagnostics, completions, go-to-def, formatting (rustfmt)
"rust-analyzer": {
"initialization_options": {
"check": { "workspace": true },
"rust": { "analyzerTargetDir": true },
// "checkOnSave": true,
// "cargo": { "allTargets": true },
},
},
// pyright — Python type checker + intellisense
// Provides: completions, go-to-def, hover, type checking, rename
"pyright": {
"settings": {
"python": {
"pythonPath": ".venv/bin/python",
},
"python.analysis": {
"typeCheckingMode": "basic",
"diagnosticMode": "openFilesOnly",
// "autoImportCompletions": true,
// "useLibraryCodeForTypes": true,
},
},
},
// ruff — Python linter + formatter
// Provides: lint diagnostics, import sorting, formatting
// Defaults for repos without pyproject.toml.
// When pyproject.toml exists, project config takes precedence.
"ruff": {
"initialization_options": {
// "filesystemFirst": use pyproject.toml/ruff.toml when found
// (walks up from file's directory), fall back to these defaults.
// Fixes: workspace root ≠ project root (e.g., monorepo)
"configurationPreference": "filesystemFirst",
"lineLength": 88,
"lint": {
"select": ["E", "W", "F", "I", "UP", "B", "SIM"],
},
},
},
// yaml-language-server — YAML + Docker Compose validation
// Provides: validation, completions, hover, schema-based checks
"yaml-language-server": {
"settings": {
"yaml": {
// "validate": true,
// "hover": true,
// "completion": true,
// "format": { "enable": true },
"schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml",
"https://json.schemastore.org/docker-compose.json": [
"docker-compose*.yml",
"compose*.yml",
],
},
},
},
},
// taplo — TOML language server + formatter
// Provides: validation, completions, formatting
"taplo": {
"settings": {
"formatter": {
"columnWidth": 88,
"indentString": " ",
"arrayTrailingComma": true,
// "alignEntries": false,
// "arrayAutoExpand": true,
},
},
},
// json-language-server — JSON validation + completions (all defaults)
// "json-language-server": {
// "settings": {
// "json": {
// "validate": { "enable": true },
// "schemas": [],
// },
// },
// },
// terraform-ls — Terraform/HCL (all defaults)
// "terraform-ls": {
// "settings": {
// "terraform": {
// "validation": { "enableEnhancedValidation": true },
// },
// },
// },
// bash-language-server — Shell scripts (all defaults)
// "bash-language-server": {
// "settings": {
// "bashIde": {
// "highlightParsingErrors": true,
// "shellcheckPath": "shellcheck",
// },
// },
// },
// docker-langserver — Dockerfiles (all defaults)
// "docker-langserver": {
// "settings": {},
// },
},
// ============================================================
// EXTENSIONS
// ============================================================
// All extensions auto-update by default.
// To pin a specific extension, set it to false:
// "auto_update_extensions": {
// "ruff": false,
// },
}
// Zed settings
// Version: v1
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
// ============================================================
// SESSION & WINDOW BEHAVIOR
// ============================================================
// Whether to trust all worktrees without prompting
// Values: true | false
"edit_predictions": {
"provider": "copilot",
},
"session": {
"trust_all_worktrees": true,
},
// Behavior when the last window is closed
// Values:
// "platform_default" - Follow OS convention (quit on macOS, stay on Linux/Windows)
// "quit" - Always quit Zed
// "keep_running" - Keep Zed running in background
"on_last_window_closed": "platform_default",
// ============================================================
// AI AGENT SETTINGS
// ============================================================
// Font size for the AI agent panel/buffer
// Values: any positive float (e.g., 12.0, 14.0, 16.0)
"agent_buffer_font_size": 15.0,
"agent": {
// Model used for inline code assistance (Cmd+K)
// provider values: "copilot_chat" | "anthropic" | "openai" | "ollama" | "google"
// model values depend on provider (e.g., "gpt-4o", "claude-3-opus", "gemini-pro")
"inline_assistant_model": {
"provider": "copilot_chat",
"model": "claude-opus-4.5",
},
// Play a sound notification when agent completes a task
// Values: true | false
"play_sound_when_agent_done": true,
// Default agent profile/behavior
// Values: "ask" | "write" | custom profile names
"default_profile": "ask",
// Review changes file-by-file vs all at once
// Values: true | false
"single_file_review": true,
// Default model for agent panel conversations
"default_model": {
"provider": "copilot_chat",
"model": "gpt-4o",
},
},
// ============================================================
// EDITOR FEATURES
// ============================================================
// ============================================================
// PANELS & LAYOUT
// ============================================================
// Outline panel shows document structure (functions, classes, etc.)
"outline_panel": {
// Where to dock the outline panel
// Values: "left" | "right"
"dock": "left",
},
// Project file tree panel
"project_panel": {
// How to sort files and folders
// Values:
// "directories_first" - Folders before files
// "alphabetical" - Pure alphabetical
"sort_mode": "directories_first",
// Indentation guide lines in file tree
"indent_guides": {
// Values: "always" | "never" | "auto"
"show": "always",
},
// Show folder icons in file tree
// Values: true | false
"folder_icons": true,
// Show file type icons in file tree
// Values: true | false
"file_icons": true,
// Spacing between file entries
// Values: "comfortable" | "standard" | "compact"
"entry_spacing": "comfortable",
// Where to dock the project panel
// Values: "left" | "right"
"dock": "right",
},
// ============================================================
// GIT INTEGRATION
// ============================================================
"git": {
"inline_blame": {
// Show commit message summary in git blame
// Values: true | false
"show_commit_summary": true,
},
},
// ============================================================
// MINIMAP & SCROLLBAR
// ============================================================
// Code minimap (overview on side of editor)
"minimap": {
// Values: "always" | "never" | "auto"
"show": "never",
},
"scrollbar": {
// When to show the scrollbar
// Values:
// "auto" - Show when important info or follow system
// "system" - Match system preference
// "always" - Always visible
// "never" - Always hidden
"show": "auto",
},
// Allow scrolling past the last line
// Values:
// "off" - Stop at last line
// "vertical_scroll_margin" - Scroll past by scroll margin amount
// "one_page" - Allow one full page past end
"scroll_beyond_last_line": "vertical_scroll_margin",
// ============================================================
// LINE NUMBERS & GUTTER
// ============================================================
// Use relative line numbers (distance from cursor)
// Values: true | false | "disabled"
"relative_line_numbers": "disabled",
// Gutter settings (left margin with line numbers, etc.)
"gutter": {
// Show code folding arrows
// Values: true | false
"folds": true,
// Minimum digits reserved for line numbers (affects gutter width)
// Values: any positive integer (e.g., 3, 4, 5)
"min_line_number_digits": 4,
// Show debugger breakpoint indicators
// Values: true | false
"breakpoints": true,
// Show run/test indicators for runnable code
// Values: true | false
"runnables": true,
// Show line numbers
// Values: true | false
"line_numbers": true,
},
// ============================================================
// CODE INTELLIGENCE & HINTS
// ============================================================
// Show function signature help after typing
// Values: true | false
"show_signature_help_after_edits": true,
// Show method signatures when inside parentheses
// Values: true | false
"auto_signature_help": true,
// Sticky scroll - keeps context (function name, class) visible
"sticky_scroll": {
// Values: true | false
"enabled": true,
},
// Delay before showing hover popover (milliseconds)
// Values: any positive integer (e.g., 0, 150, 300, 500)
"hover_popover_delay": 300,
// Colorize matching bracket pairs with different colors
// Values: true | false
"colorize_brackets": true,
// Fade out unnecessary/unused code
// Values: 0.0 (invisible) to 1.0 (fully visible)
"unnecessary_code_fade": 0.5,
// ============================================================
// SEARCH & NAVIGATION
// ============================================================
// Smart case search: case-insensitive unless uppercase used
// Values: true | false
"use_smartcase_search": true,
// Behavior when double-clicking in multi-buffer view
// Values: "select" | "open"
"double_click_in_multibuffer": "select",
// Auto-scroll editor when clicking
// Values: true | false
"autoscroll_on_clicks": false,
// Lines to show around excerpts in multi-buffer
// Values: any positive integer
"expand_excerpt_lines": 3,
// ============================================================
// THEME & ICONS
// ============================================================
// Color theme settings
"theme": {
// How to select theme
// Values: "system" | "light" | "dark"
"mode": "light",
// Theme name for light mode
// Values: any installed theme (e.g., "One Light", "Solarized Light", "GitHub Light")
"light": "One Light",
// Theme name for dark mode
// Values: any installed theme (e.g., "One Dark", "Dracula", "GitHub Dark")
"dark": "One Dark",
},
// File/folder icon theme
"icon_theme": {
// Values: "system" | "light" | "dark"
"mode": "light",
"light": "Zed (Default)",
"dark": "Zed (Default)",
},
// ============================================================
// UI FONTS
// ============================================================
// Font for UI elements (menus, panels, tabs)
// Values: any installed font name, or ".SystemUIFont" for system default
"ui_font_family": "FiraCode Nerd Font",
// Fallback fonts if primary not available
// Values: array of font names
"ui_font_fallbacks": ["Menlo", "MesloLGL Nerd Font", ".ZedMono"],
// OpenType font features for UI
"ui_font_features": {
// Contextual alternates (includes ligatures in most fonts)
// Values: true (enable) | false (disable)
"calt": true,
},
// UI font size in points
// Values: any positive float (e.g., 12.0, 14.0, 16.0)
"ui_font_size": 15.0,
// UI font weight
// Values: 100 (thin) to 900 (black), 400 is normal, 700 is bold
"ui_font_weight": 400,
// ============================================================
// EDITOR/BUFFER FONTS
// ============================================================
// Font for code in the editor
// Values: any installed monospace font name
"buffer_font_family": "FiraCode Nerd Font",
// Fallback fonts for editor
"buffer_font_fallbacks": ["Menlo", "MesloLGL Nerd Font", ".ZedMono"],
// OpenType features for editor font
"buffer_font_features": {
// Contextual alternates (ligatures like != -> ≠)
// Values: true | false
"calt": true,
},
// Editor font size in points
// Values: any positive float
"buffer_font_size": 15.0,
// Editor font weight
// Values: 100-900
"buffer_font_weight": 400,
// Line height in editor
// Values:
// "comfortable" - 1.618 ratio (golden ratio)
// "standard" - 1.3 ratio
// { "custom": N } - Custom multiplier (e.g., 1.5, 2.0)
"buffer_line_height": {
"custom": 2.0,
},
// ============================================================
// TABS
// ============================================================
"tabs": {
// Show git status colors on tabs
// Values: true | false
"git_status": true,
// Position of close button on tabs
// Values: "left" | "right"
"close_position": "left",
// Show file type icons on tabs
// Values: true | false
"file_icons": true,
},
// ============================================================
// INDENTATION & WHITESPACE
// ============================================================
// Spaces per tab
// Values: any positive integer (commonly 2 or 4)
"tab_size": 4,
// Target line length for soft wrapping and formatters
// Values: any positive integer (commonly 80, 88, 89, 100, 120)
"preferred_line_length": 89,
// Indent guide settings
"indent_guides": {
// Show indent guides
// Values: true | false
"enabled": true,
// Width of indent guide lines in pixels
// Values: 1-10
"line_width": 1,
// Width of active (current scope) indent guide
// Values: 1-10
"active_line_width": 2,
// How to color indent guides
// Values:
// "disabled" - No coloring
// "fixed" - Single color
// "indent_aware" - Different colors per indent level
"coloring": "indent_aware",
// Background coloring for indent levels
// Values: "disabled" | "indent_aware"
"background_coloring": "disabled",
},
// Show whitespace characters (tabs, spaces)
// Values:
// "selection" - Only in selected text
// "none" - Never show
// "all" - Always show all
// "boundary" - Show at edges and adjacent whitespace
"show_whitespaces": "selection",
// ============================================================
// SOFT WRAP
// ============================================================
// How to wrap long lines
// Values:
// "none" - No wrapping
// "prefer_line" - Single line unless very long
// "editor_width" - Wrap at editor edge
// "preferred_line_length" - Wrap at preferred_line_length
// "bounded" - Wrap at smaller of editor width or preferred length
"soft_wrap": "editor_width",
// ============================================================
// FORMAT ON SAVE
// ============================================================
// Automatically format code when saving (Cmd+S)
// Values: "on" | "off"
"format_on_save": "on",
// ============================================================
// TERMINAL
// ============================================================
"terminal": {
// Where to dock the terminal panel
// Values: "bottom" | "left" | "right"
"dock": "bottom",
"toolbar": {
// Show breadcrumb navigation in terminal
// Values: true | false
"breadcrumbs": false,
},
// Copy text to clipboard when selected
// Values: true | false
"copy_on_select": true,
// Minimum contrast ratio for terminal colors (accessibility)
// Values: 1.0-21.0 (higher = more contrast)
"minimum_contrast": 45.0,
// Cursor shape in terminal
// Values: "block" | "bar" | "underscore" | "hollow"
"cursor_shape": "bar",
},
// ============================================================
// CONTEXT SERVERS (MCP)
// ============================================================
// Model Context Protocol servers for extending AI capabilities
// Values: object with server configurations
"context_servers": {},
// ============================================================
// LANGUAGE-SPECIFIC SETTINGS
// ============================================================
"languages": {
// ---------------------------------------------------------
// RUST
// Systems programming language
// ---------------------------------------------------------
"Rust": {
"format_on_save": "on",
"enable_language_server": true,
"language_servers": ["rust-analyzer"],
"preferred_line_length": 100,
"soft_wrap": "editor_width",
"tab_size": 4,
},
// ---------------------------------------------------------
// PYTHON
// Primary language for Flask/FastAPI development
// ---------------------------------------------------------
"Python": {
// Format on save
// Values: "on" | "off"
"format_on_save": "on",
// Enable language server support
// Values: true | false
"enable_language_server": true,
// Language servers to use (order matters - first is primary)
// Values: array of server names
// "pyright" - Type checking, intellisense, go-to-definition
// "ruff" - Fast linting for style/errors, formatting
// "pylsp" - Python LSP (alternative to pyright)
// "basedpyright" - Enhanced pyright fork
// Recommended order: ["pyright", "ruff"]
// - Pyright first: best for completions, types, navigation
// - Ruff second: supplements with linting, formatting
"language_servers": ["pyright", "ruff"],
// Line length for Python (Black/Ruff default is 88, we use 89)
"preferred_line_length": 89,
// Wrap long lines at editor width
"soft_wrap": "editor_width",
// Python-specific indent guides
"indent_guides": {
"background_coloring": "disabled",
"coloring": "indent_aware",
},
// Formatter chain - executed in order on save
// Can combine multiple formatters/actions
"formatter": [
// 1. Ruff LSP formatting
{
"language_server": {
"name": "ruff",
},
},
// 2. Organize imports via Ruff
{
"code_action": "source.organizeImports.ruff",
},
// 3. Apply all Ruff auto-fixes
{
"code_action": "source.fixAll.ruff",
},
// 4. Final pass with Black for consistent style
{
"external": {
"command": "/opt/homebrew/bin/black",
"arguments": ["-", "--line-length", "89"],
},
},
],
},
// ---------------------------------------------------------
// MARKDOWN
// Documentation, READMEs
// ---------------------------------------------------------
"Markdown": {
"format_on_save": "on",
// Format as you type (can be disruptive for prose)
// Values: true | false
"use_on_type_format": false,
"prettier": {
// Allow Prettier to format Markdown
// Values: true | false
"allowed": true,
},
},
// ---------------------------------------------------------
// SQL
// Database queries
// ---------------------------------------------------------
"SQL": {
"format_on_save": "on",
// Use Prettier for SQL formatting
// Values: "prettier" | "language_server" | { "external": {...} }
"formatter": "prettier",
"prettier": {
"allowed": true,
// Parser to use for SQL
// Values: "sql" | "postgresql" | "mysql" | etc.
"parser": "sql",
// Required plugins for SQL formatting
"plugins": ["prettier-plugin-sql"],
},
"tab_size": 4,
},
// ---------------------------------------------------------
// JSON
// Config files, API responses
// ---------------------------------------------------------
"JSON": {
"format_on_save": "on",
// 4-space indent per your preference
"tab_size": 4,
"formatter": "prettier",
"prettier": {
"allowed": true,
},
},
// ---------------------------------------------------------
// JSONC (JSON with Comments)
// VSCode settings, tsconfig, etc.
// ---------------------------------------------------------
"JSONC": {
"format_on_save": "on",
"tab_size": 4,
"formatter": "prettier",
"prettier": {
"allowed": true,
},
},
// ---------------------------------------------------------
// YAML
// Docker Compose, GitHub Actions, Kubernetes
// ---------------------------------------------------------
"YAML": {
"format_on_save": "on",
// YAML standard is 2-space indent
"tab_size": 2,
"formatter": "prettier",
"prettier": {
"allowed": true,
},
},
// ---------------------------------------------------------
// TOML
// pyproject.toml, Cargo.toml, config files
// ---------------------------------------------------------
"TOML": {
"format_on_save": "on",
"tab_size": 2,
},
// ---------------------------------------------------------
// DOCKERFILE
// Container definitions
// ---------------------------------------------------------
"Dockerfile": {
// Often better to not auto-format Dockerfiles
"format_on_save": "off",
"tab_size": 4,
},
// ---------------------------------------------------------
// SHELL SCRIPT
// .sh files
// ---------------------------------------------------------
"Shell Script": {
"format_on_save": "on",
"tab_size": 4,
},
// ---------------------------------------------------------
// BASH
// Bash-specific scripts
// ---------------------------------------------------------
"Bash": {
"format_on_save": "on",
"tab_size": 4,
},
// ---------------------------------------------------------
// MAKE
// Makefiles (MUST use tabs, not spaces)
// ---------------------------------------------------------
"Make": {
// Don't auto-format Makefiles (can break them)
"format_on_save": "off",
// Makefiles require hard tabs
// Values: true | false
"hard_tabs": true,
},
// ---------------------------------------------------------
// HCL (HashiCorp Configuration Language)
// Terraform files
// ---------------------------------------------------------
"HCL": {
"format_on_save": "on",
// Terraform convention is 2 spaces
"tab_size": 2,
},
// ---------------------------------------------------------
// XML
// Config files, Maven POMs
// ---------------------------------------------------------
"XML": {
"format_on_save": "on",
"tab_size": 2,
},
// ---------------------------------------------------------
// CSV / TSV
// Data files - don't format (breaks structure)
// ---------------------------------------------------------
"CSV": {
"format_on_save": "off",
},
"TSV": {
"format_on_save": "off",
},
},
// ============================================================
// LANGUAGE SERVER PROTOCOL (LSP) SETTINGS
// Detailed configuration for each language server
// ============================================================
"lsp": {
// ---------------------------------------------------------
// RUST-ANALYZER
// Rust language server
// Docs: https://rust-analyzer.github.io/manual.html
// ---------------------------------------------------------
"rust-analyzer": {
"initialization_options": {
"checkOnSave": true,
"cargo": {
"allTargets": true,
},
"check": {
"workspace": true,
},
"rust": {
"analyzerTargetDir": true,
},
},
},
// ---------------------------------------------------------
// PYRIGHT
// Static type checker and intellisense for Python
// Docs: https://github.com/microsoft/pyright
// ---------------------------------------------------------
"pyright": {
"settings": {
"python": {
// Path to Python interpreter
// Values: path string (e.g., ".venv/bin/python", "/usr/bin/python3")
// Using .venv for uv/virtualenv compatibility
"pythonPath": ".venv/bin/python",
},
"python.analysis": {
// Type checking strictness
// Values:
// "off" - No type checking
// "basic" - Basic checks (recommended for most projects)
// "standard" - More strict
// "strict" - Full strict mode (can be noisy)
"typeCheckingMode": "basic",
// Suggest auto-imports in completions
// Values: true | false
"autoImportCompletions": true,
// Which files to analyze
// Values:
// "openFilesOnly" - Only open files (faster)
// "workspace" - Entire workspace (slower, more thorough)
"diagnosticMode": "openFilesOnly",
// Use type stubs from libraries
// Values: true | false
"useLibraryCodeForTypes": true,
},
},
},
// ---------------------------------------------------------
// RUFF
// Fast Python linter and formatter (replaces flake8, black, isort)
// Docs: https://docs.astral.sh/ruff/
// ---------------------------------------------------------
"ruff": {
"initialization_options": {
"settings": {
// Max line length (match Black/project config)
// Values: any positive integer
"lineLength": 89,
"lint": {
// Rules to enable
// Values: array of rule codes
// "E" - pycodestyle errors
// "F" - Pyflakes
// "W" - pycodestyle warnings
// "I" - isort (import sorting)
// "UP" - pyupgrade (modern Python syntax)
// "B" - flake8-bugbear (common bugs)
// "C4" - flake8-comprehensions
// "SIM" - flake8-simplify
// See: https://docs.astral.sh/ruff/rules/
"select": ["E", "F", "W", "I", "UP", "B", "C4", "SIM"],
// Rules to ignore
// Values: array of rule codes
// "E501" - Line too long (let Black handle this)
"ignore": ["E501"],
},
},
},
},
// ---------------------------------------------------------
// YAML-LANGUAGE-SERVER
// YAML validation, completion, hover
// Docs: https://github.com/redhat-developer/yaml-language-server
// ---------------------------------------------------------
"yaml-language-server": {
"settings": {
"yaml": {
// Validate YAML syntax and schemas
// Values: true | false
"validate": true,
// Show hover information
// Values: true | false
"hover": true,
// Enable auto-completion
// Values: true | false
"completion": true,
"format": {
// Enable YAML formatting
// Values: true | false
"enable": true,
},
// JSON Schema mappings for validation
// Keys: schema URL, Values: file glob patterns
"schemas": {
// GitHub Actions workflow validation
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml",
// Docker Compose validation
"https://json.schemastore.org/docker-compose.json": [
"docker-compose*.yml",
"compose*.yml",
],
},
},
},
},
// ---------------------------------------------------------
// JSON-LANGUAGE-SERVER
// JSON validation and completion
// Docs: https://github.com/microsoft/vscode-json-languageservice
// ---------------------------------------------------------
"json-language-server": {
"settings": {
"json": {
"validate": {
// Enable JSON validation
// Values: true | false
"enable": true,
},
// Custom schema mappings (add as needed)
// Format: [{ "fileMatch": ["*.json"], "url": "schema-url" }]
"schemas": [],
},
},
},
// ---------------------------------------------------------
// TERRAFORM-LS
// Terraform/HCL language server
// Docs: https://github.com/hashicorp/terraform-ls
// ---------------------------------------------------------
"terraform-ls": {
"settings": {
"terraform": {
"validation": {
// Enhanced validation with provider schemas
// Values: true | false
"enableEnhancedValidation": true,
},
},
},
},
// ---------------------------------------------------------
// BASH-LANGUAGE-SERVER
// Shell script intellisense
// Docs: https://github.com/bash-lsp/bash-language-server
// ---------------------------------------------------------
"bash-language-server": {
"settings": {
"bashIde": {
// File patterns to treat as bash scripts
// Values: glob pattern string
"globPattern": "**/*@(.sh|.bash|.inc|.command)",
// Highlight parsing errors
// Values: true | false
"highlightParsingErrors": true,
// Path to shellcheck binary for additional linting
// Values: path string or "shellcheck" if in PATH
// Install: brew install shellcheck
"shellcheckPath": "shellcheck",
},
},
},
// ---------------------------------------------------------
// DOCKER-LANGSERVER
// Dockerfile language server
// Docs: https://github.com/rcjsuen/dockerfile-language-server
// ---------------------------------------------------------
"docker-langserver": {
"settings": {},
},
// ---------------------------------------------------------
// TAPLO
// TOML language server and formatter
// Docs: https://taplo.tamasfe.dev/
// ---------------------------------------------------------
"taplo": {
"settings": {
"formatter": {
// Align table entries (key = value alignment)
// Values: true | false
"alignEntries": false,
// Auto-expand arrays to multiple lines
// Values: true | false
"arrayAutoExpand": true,
// Add trailing comma to arrays
// Values: true | false
"arrayTrailingComma": true,
// Max column width before wrapping
// Values: any positive integer
"columnWidth": 89,
},
},
},
},
// ============================================================
// EXTENSION AUTO-UPDATE
// ============================================================
// Control auto-updates for specific extensions
// Values: { "extension-name": true | false }
// Set to false to pin an extension version
"auto_update_extensions": {
"ruff": false,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment