// $DOTFILES/tools/zed/settings.json
// vim:ft=jsonc

// Location:
// GNU/Linux: ~/.config/zed/settings.json
// Windows: %APPDATA%\Zed\settings.json
// Linking: (link the whole directory)
// ln -sf $DOTFILES/tools/zed ~/.config/zed
//
// Zed settings
//
// 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)
{
  // Theming
  "icon_theme": "Material Icon Theme",
  "theme": {
    "mode": "system",
    "light": "Rosé Pine Dawn",
    "dark": "Catppuccin Macchiato"
  },
  "tabs": {
    "show_diagnostics": "errors",
    "show_close_button": "hover",
    "file_icons": true
  },
  // Base keymaps
  "base_keymap": "VSCode",
  "vim_mode": true,
  "vim": {
    "use_system_clipboard": "on_yank",
    "use_smartcase_find": true
  },
  "features": {
    "edit_prediction_provider": "zed"
  },
  "outline_panel": {
    "dock": "right"
  },
  "edit_predictions": {
    "disabled_globs": ["*.bean", "*.env", "secrets.yaml"],
    // "mode": "eager_preview",
    "copilot": {
      "proxy": null,
      "proxy_no_verify": null
    }
  },
  "ui_font_size": 16,
  "buffer_font_size": null,
  "relative_line_numbers": true,
  "buffer_font_family": "Maple Mono NF CN",
  "remove_trailing_whitespace_on_save": true,
  "agent": {
    "default_model": {
      "provider": "openrouter",
      "model": "openai/gpt-5.1-codex"
    }
  },
  "inlay_hints": {
    "enabled": true,
    "show_type_hints": true,
    "show_parameter_hints": true
  },
  "terminal": {
    "detect_venv": {
      "on": {
        "directories": [".venv"]
      }
    },
    "dock": "bottom",
    "env": {
      "EDITOR": "zeditor --wait"
    },
    "shell": {
      "program": "zsh"
    },
    "option_as_meta": true
  },
  "file_types": {
    "JSON": ["*.code-snippets"]
  },
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },
  "languages": {
    "YAML": {
      "tab_size": 2
    },
    "Nix": {
      "tab_size": 2,
      "formatter": {
        "external": {
          "command": "alejandra",
          "arguments": ["--quiet", "--"]
        }
      },
      "completions": {
        "lsp_insert_mode": "replace"
      }
    },
    "Lua": {
      "tab_size": 2,
      "formatter": {
        "external": {
          "command": "stylua"
        }
      }
    }
  },
  "auto_install_extensions": {
    "catppuccin": true,
    "material-icon-theme": true,
    "git-firefly": true
  }
}
