折腾笔记[15]-配置Zed编辑器

摘要

配置Zed编辑器显示过长文本时自动换行, 关闭保存时自动格式化代码等乱改代码的设定。

关键信息

  • macOS: 14.6.1
  • ZedEditor: 0.171.6
  • ollama: 0.5.7

简介

Zed编辑器简介

  • 开发者的效率神器🚀
    [https://zed.dev]
    Zed 是一款高性能编程编辑器,旨在适合人类和AI的协作。它使用Rust语言从头开发,能够有效利用多核CPU和GPU。此外,它还可以集成未来的大型语言模型(LLM)到你的工作流里,帮助你生成、转换和分析代码。

相比于传统编程体验,你可以与同事共用屏幕,聊天并对项目进行笔记。甚至,你也可以使用它来直接与LLM如Claude 3.5 Sonnet交互,秒级完成程序开发流程。

Zed is a next-generation code editor designed for
high-performance collaboration with humans and AI.
Written from scratch in Rust to efficiently leverage multiple CPU cores and your GPU.
Integrate upcoming LLMs into your workflow to generate, transform, and analyze code.
Chat with teammates, write notes together, and share your screen and project. All included.

I've had my mind blown using Zed with Claude 3.5 Sonnet.I wrote up a few sentences around a research idea and Claude 3.5 Sonnet delivered a first pass in seconds. When I spotted some small mistakes, I highlighted the parts I wanted to change and shared feedback for it to fix. I was able to go from idea to running experiment code in half an hour—it was really easy and fun.
Multibuffers compose excerpts from across the codebase in one editable surface.
Zed is built by a global community of thousand of developers.
Boost your Zed experience by choosing from hundreds of extensions that broaden language support, offer different themes, and more.

大家好!今天给大家种草一款超强的编辑器——Zed!它不仅仅是一个编辑器,更是提升开发效率的利器。无论你是前端、后端还是全栈开发者,Zed都能让你的工作流更加顺畅。一起来看看它的核心功能吧!👇

1. 远程开发 🌐

Zed支持远程开发,将计算任务转移到服务器上,让你在本地也能轻松处理大型项目,再也不用担心电脑卡顿了!

2. 多缓冲区诊断 🚨

Zed提供项目级的错误和警告提示,让你一眼就能发现代码中的问题,再也不用逐个文件排查了,效率直接拉满!

3. 自定义代码片段 ✂️

通过自定义代码片段,Zed可以帮你快速完成重复性工作,节省大量时间。写代码再也不用“复制粘贴”了,一键搞定!

4. 命令行集成 💻

Zed支持命令行操作,你可以直接在终端中使用Zed,无缝衔接你的开发环境,操作更加灵活。

5. Markdown预览 📝

写文档时,Zed的Markdown预览功能可以实时展示文档效果,再也不用频繁切换窗口了,写文档也能如此优雅!

6. 重命名重构 🔧

Zed支持项目级的符号重命名,一键修改整个项目中的变量、函数名,再也不用担心漏改某个地方了,重构代码so easy!

7. 语法感知选择 🎯

Zed的语法感知选择功能可以高效地选择语法节点,让你在编辑代码时更加精准,操作更加流畅。

8. 内联提示 🔍

Zed的内联提示功能可以让你在代码中快速查看相关信息,无需跳转到其他文件,写代码时更加得心应手。

Zed不仅仅是一个编辑器,它更像是一个开发助手,帮你解决开发中的各种痛点。无论是远程开发、代码重构,还是文档编写,Zed都能让你事半功倍。如果你还在寻找一款高效的编辑器,Zed绝对值得一试!💪

快去体验吧,相信你会爱上它的!😉

Vim编辑器模式

[https://missing-semester-cn.github.io/2020/editors/]
[https://www.freecodecamp.org/chinese/news/vim-editor-modes-explained/]
写作和写代码其实是两项非常不同的活动。当我们编程的时候,会经常在文件间进行切换、阅读、浏览和修改代码,而不是连续编写一大段的文字。因此代码编辑器和文本编辑器是很不同的两种工具(例如微软的 Word 与 Visual Studio Code)。
Vim 有着悠久历史;它始于 1976 年的 Vi 编辑器,到现在还在 不断开发中。Vim 有很多聪明的设计思想,所以很多其他工具也支持 Vim 模式(比如,140 万人安装了 Vim emulation for VS code)。即使你最后使用 其他编辑器,Vim 也值得学习。
在编程的时候,你会把大量时间花在阅读/编辑而不是在写代码上。所以,Vim 是一个 多模态 编辑 器:它对于插入文字和操纵文字有不同的模式。Vim 是可编程的(可以使用 Vimscript 或者像 Python 一样的其他程序语言),Vim 的接口本身也是一个程序语言:键入操作(以及其助记名) 是命令,这些命令也是可组合的。Vim 避免了使用鼠标,因为那样太慢了;Vim 甚至避免用 上下左右键因为那样需要太多的手指移动。

这样的设计哲学使得 Vim 成为了一个能跟上你思维速度的编辑器。

Vim 的设计以大多数时间都花在阅读、浏览和进行少量编辑改动为基础,因此它具有多种操作模式:

正常模式:在文件中四处移动光标进行修改
插入模式:插入文本
替换模式:替换文本
可视化模式(一般,行,块):选中文本块
命令模式:用于执行命令
在不同的操作模式下,键盘敲击的含义也不同。比如,x 在插入模式会插入字母 x,但是在正常模式 会删除当前光标所在的字母,在可视模式下则会删除选中文块。

在默认设置下,Vim 会在左下角显示当前的模式。Vim 启动时的默认模式是正常模式。通常你会把大部分 时间花在正常模式和插入模式。

你可以按下 (退出键)从任何其他模式返回正常模式。在正常模式,键入 i 进入插入 模式,R 进入替换模式,v 进入可视(一般)模式,V 进入可视(行)模式, (Ctrl-V, 有时也写作 ^V)进入可视(块)模式,: 进入命令模式。

因为你会在使用 Vim 时大量使用 键,所以可以考虑把大小写锁定键重定义成 键(MacOS 教程)。

在正常模式,键入 i 进入插入模式。现在 Vim 跟很多其他的编辑器一样,直到你键入 返回正常模式。你只需要掌握这一点和上面介绍的所有基础知识就可以使用 Vim 来编辑文件了 (虽然如果你一直停留在插入模式内不一定高效)。

Vim 会维护一系列打开的文件,称为“缓存”。一个 Vim 会话包含一系列标签页,每个标签页包含 一系列窗口(分隔面板)。每个窗口显示一个缓存。跟网页浏览器等其他你熟悉的程序不一样的是, 缓存和窗口不是一一对应的关系;窗口只是缓冲区的视图。一个缓存可以在 多个 窗口打开,甚至在同一 个标签页内的多个窗口打开。这个功能其实很好用,比如可以查看同一个文件的不同部分。

Vim 默认打开一个标签页,这个标签也包含一个窗口。

在正常模式下键入 : 进入命令行模式。 在键入 : 后,你的光标会立即跳到屏幕下方的命令行。 这个模式有很多功能,包括打开,保存,关闭文件,以及 退出 Vim。

:q 退出(关闭窗口)
:w 保存(写)
:wq 保存然后退出
:e {文件名} 打开要编辑的文件
:ls 显示打开的缓存
:help {标题} 打开帮助文档
:help :w 打开 :w 命令的帮助文档
:help w 打开 w 移动的帮助文档

支持添加注释的json:json5

[https://www.freecodecamp.org/news/comments-in-json/]
[https://json5.org]
[https://github.com/json5/json5]

  • JSON5:让JSON更人性化的升级版✨

大家好!今天给大家安利一个超实用的工具——JSON5,它是JSON的升级版,专为人类设计,写起来更轻松,维护起来更方便!🎉

什么是JSON5?

JSON5是JSON的扩展版本,主要目的是让配置文件等手动编写的文件更易读、易写。它不是用于机器间通信的(这种场景还是用JSON或其他格式吧~)。自2012年推出以来,JSON5已经成为了众多大项目的宠儿,比如Chromium、Next.js、Babel、Retool、WebStorm等,甚至在MacOS和iOS上也原生支持!🚀

JSON5的亮点功能🌟

JSON5在JSON的基础上,引入了ECMAScript 5.1(ES5)的一些特性,让文件编写更灵活:

  • 对象:键名可以是ES5的标识符,支持尾随逗号。
  • 数组:也支持尾随逗号。
  • 字符串:可以用单引号,支持多行字符串和字符转义。
  • 数字:支持十六进制、前后小数点、IEEE 754的无穷大和NaN,还能加正号。
  • 注释:支持单行和多行注释。
  • 空白字符:允许更多空白字符。

JSON5示例

{
  // 注释
  unquoted: '可以不加引号',
  singleQuotes: '我可以用"双引号"',
  lineBreaks: "看,妈妈!\
不用\\n!",
  hexadecimal: 0xdecaf,
  leadingDecimalPoint: .8675309, andTrailing: 8675309.,
  positiveSign: +1,
  trailingComma: '对象中的尾随逗号', andIn: ['数组中的尾随逗号',],
  "backwardsCompatible": "与JSON兼容",
}

为什么JSON不支持注释?🤔

JSON的设计初衷是简单、易解析,所以它的创建者Douglas Crockford故意去掉了注释功能,防止人们滥用注释来存储解析指令,从而破坏系统的兼容性。因此,JSON文件官方不支持注释

如何在JSON中添加注释?💡

虽然JSON不支持注释,但我们可以通过一些小技巧来实现:

  1. 自定义元素:在JSON对象中添加一个特殊的键,比如"_comment",用来存储注释内容。
  2. 数据对:将注释作为数据对的一部分,虽然不推荐,但这是目前唯一可行的方法。

总结

JSON5是JSON的升级版,更适合人类编写和维护,尤其是在配置文件中。如果你还在为JSON的严格语法头疼,不妨试试JSON5,它会让你事半功倍!💪

希望这篇分享对你有帮助,快去试试吧!😉

代码编辑器术语

  1. 侧边栏代码缩略图(minimap)
  2. 滚动条
  3. 自动换行

Zed配置AI代码自动补全

[https://zed.dev/docs/assistant/assistant]
[https://zed.dev/docs/assistant/inline-assistant]
[https://zed.dev/docs/completions]
[https://github.com/zed-industries/zed/issues/16030]
[https://github.com/zed-industries/zed/issues/15968]
[https://github.com/bernardo-bruning/ollama-copilot]
助手是一个强大的工具,它将大型语言模型集成到您的开发工作流程中。
助手包括如下方面:
助手面板:创建和协作编辑新的聊天,并管理与语言模型的交互。
内联助手:了解如何使用助手在代码编辑器和终端中直接进行内联转换。
提供者与配置:配置助手,并设置不同的语言模型提供者,如Anthropic、OpenAI、Ollama、LM Studio、Google Gemini和GitHub Copilot Chat。
引入上下文:了解上下文(类似于对话),并学习它们如何推动您、您的项目和助手/模型之间的交互。
使用命令:探索增强助手功能和未来可扩展性的斜杠命令。
提示与提示库:学习如何编写和保存提示,如何使用提示库,以及如何编辑提示模板。
上下文服务器:了解通过模型上下文协议增强助手功能的上下文服务器。

您可以使用 Ctrl + Enter 在几乎所有可以输入文本的地方打开内联助手:编辑器、助手面板、提示库、频道笔记,甚至终端面板中。
内联助手允许您将当前选中的内容(或当前行)发送到语言模型,并使用语言模型的响应来修改选中的内容。
您还可以通过以下方式执行多个生成请求:
在多个光标位置按下 Ctrl + Enter
在跨越多段内容的多缓冲区中选择内容后按下 Ctrl + Enter
内联助手从助手面板中获取上下文,允许您为代码转换提供额外的指令或规则。

Zed 支持两种代码自动补全来源:
代码补全:由语言服务器(LSPs)提供,这些服务器由 Zed 自动安装或通过 Zed 语言扩展安装。
内联补全:由外部 API 提供,例如 GitHub Copilot 或 Supermaven。

配置好内联补全提供者后,您就可以在代码中使用内联补全了。内联补全会随着您的输入自动出现,您可以通过按下 TabEnter 来接受补全,或者按下 Esc 来隐藏补全。

以下是一些与内联补全交互的操作/快捷键:

  • editor: accept inline completion (Tab):接受当前的内联补全
  • editor: accept partial inline completion (Cmd + →):接受当前内联补全到下一个单词边界
  • editor: show inline completion (Alt + ):手动触发内联补全请求
  • editor: next inline completion (Alt + ]):切换到下一个内联补全
  • editor: previous inline completion (Alt + [):切换到上一个内联补全

这些快捷键和操作可以帮助您更高效地使用内联补全功能,提升编码体验。

配置文件

自定义配置文件

{
  "show_inline_completions": false,
  "inline_completions": {
    "disabled_globs": [
      "**/.env*",
      "**/*.pem",
      "**/*.key",
      "**/*.cert",
      "**/*.crt",
      "**/secrets.yml"
    ]
  },
  "languages": {
    "Vue.js": {
      "show_inline_completions": false
    }
  },
  "assistant": {
    "default_model": {
      "provider": "ollama",
      "model": "modelscope.cn/AI-ModelScope/DeepSeek-Coder-V2-Lite-Instruct-GGUF:DeepSeek-Coder-V2-Lite-Instruct-Q2_K.gguf"
    },
    "version": "2"
  },
  "features": {
    "inline_completion_provider": "supermaven",
    "show_inline_completions": true
  },
  "theme": "Siri Dark",
  "vim_mode": false,
  "ui_font_size": 16,
  "buffer_font_size": 13.0,
  // 自动换行, 选项: bounded, editor_width,
  "soft_wrap": "editor_width",
  "editor.scrollBeyondLastColumn": 5,
  // 关闭保存时自动格式化代码, 忠于原文
  "format_on_save": "off",
  // 显示制表符
  "show_whitespaces": "all",
  // 关闭格式化, 严禁乱删空格
  "remove_trailing_whitespace_on_save": false,
  // 不要试图猜测用户的意图
  "extend_comment_on_newline": false
}

默认配置文件

{
  // The name of the Zed theme to use for the UI.
  //
  // `mode` is one of:
  // - "system": Use the theme that corresponds to the system's appearance
  // - "light": Use the theme indicated by the "light" field
  // - "dark": Use the theme indicated by the "dark" field
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark"
  },
  // The name of a base set of key bindings to use.
  // This setting can take four values, each named after another
  // text editor:
  //
  // 1. "VSCode"
  // 2. "Atom"
  // 3. "JetBrains"
  // 4. "None"
  // 5. "SublimeText"
  // 6. "TextMate"
  "base_keymap": "VSCode",
  // Features that can be globally enabled or disabled
  "features": {
    // Which inline completion provider to use.
    "inline_completion_provider": "copilot"
  },
  // The name of a font to use for rendering text in the editor
  "buffer_font_family": "Zed Plex Mono",
  // Set the buffer text's font fallbacks, this will be merged with
  // the platform's default fallbacks.
  "buffer_font_fallbacks": null,
  // The OpenType features to enable for text in the editor.
  "buffer_font_features": {
    // Disable ligatures:
    // "calt": false
  },
  // The default font size for text in the editor
  "buffer_font_size": 15,
  // The weight of the editor font in standard CSS units from 100 to 900.
  "buffer_font_weight": 400,
  // Set the buffer's line height.
  // May take 3 values:
  //  1. Use a line height that's comfortable for reading (1.618)
  //         "buffer_line_height": "comfortable"
  //  2. Use a standard line height, (1.3)
  //         "buffer_line_height": "standard",
  //  3. Use a custom line height
  //         "buffer_line_height": {
  //           "custom": 2
  //         },
  "buffer_line_height": "comfortable",
  // The name of a font to use for rendering text in the UI
  // You can set this to ".SystemUIFont" to use the system font
  "ui_font_family": "Zed Plex Sans",
  // Set the UI's font fallbacks, this will be merged with the platform's
  // default font fallbacks.
  "ui_font_fallbacks": null,
  // The OpenType features to enable for text in the UI
  "ui_font_features": {
    // Disable ligatures:
    "calt": false
  },
  // The weight of the UI font in standard CSS units from 100 to 900.
  "ui_font_weight": 400,
  // The default font size for text in the UI
  "ui_font_size": 16,
  // How much to fade out unused code.
  "unnecessary_code_fade": 0.3,
  // Active pane styling settings.
  "active_pane_modifiers": {
    // The factor to grow the active pane by. Defaults to 1.0
    // which gives the same size as all other panes.
    "magnification": 1.0,
    // Inset border size of the active pane, in pixels.
    "border_size": 0.0,
    // Opacity of the inactive panes. 0 means transparent, 1 means opaque.
    // Values are clamped to the [0.0, 1.0] range.
    "inactive_opacity": 1.0
  },
  // The direction that you want to split panes horizontally. Defaults to "up"
  "pane_split_direction_horizontal": "up",
  // The direction that you want to split panes horizontally. Defaults to "left"
  "pane_split_direction_vertical": "left",
  // Centered layout related settings.
  "centered_layout": {
    // The relative width of the left padding of the central pane from the
    // workspace when the centered layout is used.
    "left_padding": 0.2,
    // The relative width of the right padding of the central pane from the
    // workspace when the centered layout is used.
    "right_padding": 0.2
  },
  // The key to use for adding multiple cursors
  // Currently "alt" or "cmd_or_ctrl"  (also aliased as
  // "cmd" and "ctrl") are supported.
  "multi_cursor_modifier": "alt",
  // Whether to enable vim modes and key bindings.
  "vim_mode": false,
  // Whether to show the informational hover box when moving the mouse
  // over symbols in the editor.
  "hover_popover_enabled": true,
  // Time to wait before showing the informational hover box
  "hover_popover_delay": 350,
  // Whether to confirm before quitting Zed.
  "confirm_quit": false,
  // Whether to restore last closed project when fresh Zed instance is opened.
  "restore_on_startup": "last_session",
  // Size of the drop target in the editor.
  "drop_target_size": 0.2,
  // Whether the window should be closed when using 'close active item' on a window with no tabs.
  // May take 3 values:
  //  1. Use the current platform's convention
  //         "when_closing_with_no_tabs": "platform_default"
  //  2. Always close the window:
  //         "when_closing_with_no_tabs": "close_window",
  //  3. Never close the window
  //         "when_closing_with_no_tabs": "keep_window_open",
  "when_closing_with_no_tabs": "platform_default",
  // Whether to use the system provided dialogs for Open and Save As.
  // When set to false, Zed will use the built-in keyboard-first pickers.
  "use_system_path_prompts": true,
  // Whether the cursor blinks in the editor.
  "cursor_blink": true,
  // Cursor shape for the default editor.
  //  1. A vertical bar
  //     "bar"
  //  2. A block that surrounds the following character
  //     "block"
  //  3. An underline / underscore that runs along the following character
  //     "underline"
  //  4. A box drawn around the following character
  //     "hollow"
  //
  // Default: not set, defaults to "bar"
  "cursor_shape": null,
  // How to highlight the current line in the editor.
  //
  // 1. Don't highlight the current line:
  //    "none"
  // 2. Highlight the gutter area:
  //    "gutter"
  // 3. Highlight the editor area:
  //    "line"
  // 4. Highlight the full line (default):
  //    "all"
  "current_line_highlight": "all",
  // The debounce delay before querying highlights from the language
  // server based on the current cursor location.
  "lsp_highlight_debounce": 75,
  // Whether to pop the completions menu while typing in an editor without
  // explicitly requesting it.
  "show_completions_on_input": true,
  // Whether to display inline and alongside documentation for items in the
  // completions menu
  "show_completion_documentation": true,
  // Show method signatures in the editor, when inside parentheses.
  "auto_signature_help": false,
  /// Whether to show the signature help after completion or a bracket pair inserted.
  /// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
  "show_signature_help_after_edits": false,
  /// Whether to show the inline completions next to the completions provided by a language server.
  /// Only has an effect if inline completion provider supports it.
  "show_inline_completions_in_menu": true,
  // Whether to show wrap guides (vertical rulers) in the editor.
  // Setting this to true will show a guide at the 'preferred_line_length' value
  // if 'soft_wrap' is set to 'preferred_line_length', and will show any
  // additional guides as specified by the 'wrap_guides' setting.
  "show_wrap_guides": true,
  // Character counts at which to show wrap guides in the editor.
  "wrap_guides": [],
  // Hide the values of in variables from visual display in private files
  "redact_private_values": false,
  // The default number of lines to expand excerpts in the multibuffer by.
  "expand_excerpt_lines": 3,
  // Globs to match against file paths to determine if a file is private.
  "private_files": ["**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/secrets.yml"],
  // Whether to use additional LSP queries to format (and amend) the code after
  // every "trigger" symbol input, defined by LSP server capabilities.
  "use_on_type_format": true,
  // Whether to automatically add matching closing characters when typing
  // opening parenthesis, bracket, brace, single or double quote characters.
  // For example, when you type (, Zed will add a closing ) at the correct position.
  "use_autoclose": true,
  // Whether to automatically surround selected text when typing opening parenthesis,
  // bracket, brace, single or double quote characters.
  // For example, when you select text and type (, Zed will surround the text with ().
  "use_auto_surround": true,
  // Whether indentation of pasted content should be adjusted based on the context.
  "auto_indent_on_paste": true,
  // Controls how the editor handles the autoclosed characters.
  // When set to `false`(default), skipping over and auto-removing of the closing characters
  // happen only for auto-inserted characters.
  // Otherwise(when `true`), the closing characters are always skipped over and auto-removed
  // no matter how they were inserted.
  "always_treat_brackets_as_autoclosed": false,
  // Controls whether inline completions are shown immediately (true)
  // or manually by triggering `editor::ShowInlineCompletion` (false).
  "show_inline_completions": true,
  // Controls whether inline completions are shown in a given language scope.
  // Example: ["string", "comment"]
  "inline_completions_disabled_in": [],
  // Whether to show tabs and spaces in the editor.
  // This setting can take three values:
  //
  // 1. Draw tabs and spaces only for the selected text (default):
  //    "selection"
  // 2. Do not draw any tabs or spaces:
  //    "none"
  // 3. Draw all invisible symbols:
  //    "all"
  // 4. Draw whitespaces at boundaries only:
  //    "boundary"
  // For a whitespace to be on a boundary, any of the following conditions need to be met:
  // - It is a tab
  // - It is adjacent to an edge (start or end)
  // - It is adjacent to a whitespace (left or right)
  "show_whitespaces": "selection",
  // Settings related to calls in Zed
  "calls": {
    // Join calls with the microphone live by default
    "mute_on_join": false,
    // Share your project when you are the first to join a channel
    "share_on_join": false
  },
  // Toolbar related settings
  "toolbar": {
    // Whether to show breadcrumbs.
    "breadcrumbs": true,
    // Whether to show quick action buttons.
    "quick_actions": true,
    // Whether to show the Selections menu in the editor toolbar
    "selections_menu": true
  },
  // Scrollbar related settings
  "scrollbar": {
    // When to show the scrollbar in the editor.
    // This setting can take four values:
    //
    // 1. Show the scrollbar if there's important information or
    //    follow the system's configured behavior (default):
    //   "auto"
    // 2. Match the system's configured behavior:
    //    "system"
    // 3. Always show the scrollbar:
    //    "always"
    // 4. Never show the scrollbar:
    //    "never"
    "show": "auto",
    // Whether to show cursor positions in the scrollbar.
    "cursors": true,
    // Whether to show git diff indicators in the scrollbar.
    "git_diff": true,
    // Whether to show buffer search results in the scrollbar.
    "search_results": true,
    // Whether to show selected symbol occurrences in the scrollbar.
    "selected_symbol": true,
    // Which diagnostic indicators to show in the scrollbar:
    //  - "none" or false: do not show diagnostics
    //  - "error": show only errors
    //  - "warning": show only errors and warnings
    //  - "information": show only errors, warnings, and information
    //  - "all" or true: show all diagnostics
    "diagnostics": "all",
    /// Forcefully enable or disable the scrollbar for each axis
    "axes": {
      /// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
      "horizontal": true,
      /// When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
      "vertical": true
    }
  },
  // Enable middle-click paste on Linux.
  "middle_click_paste": true,
  // What to do when multibuffer is double clicked in some of its excerpts
  // (parts of singleton buffers).
  // May take 2 values:
  //  1. Behave as a regular buffer and select the whole word (default).
  //         "double_click_in_multibuffer": "select"
  //  2. Open the excerpt clicked as a new buffer in the new tab.
  //         "double_click_in_multibuffer": "open",
  // For the case of "open", regular selection behavior can be achieved by holding `alt` when double clicking.
  "double_click_in_multibuffer": "select",
  "gutter": {
    // Whether to show line numbers in the gutter.
    "line_numbers": true,
    // Whether to show code action buttons in the gutter.
    "code_actions": true,
    // Whether to show runnables buttons in the gutter.
    "runnables": true,
    // Whether to show fold buttons in the gutter.
    "folds": true
  },
  "indent_guides": {
    /// Whether to show indent guides in the editor.
    "enabled": true,
    /// The width of the indent guides in pixels, between 1 and 10.
    "line_width": 1,
    /// The width of the active indent guide in pixels, between 1 and 10.
    "active_line_width": 1,
    /// Determines how indent guides are colored.
    /// This setting can take the following three values:
    ///
    /// 1. "disabled"
    /// 2. "fixed"
    /// 3. "indent_aware"
    "coloring": "fixed",
    /// Determines how indent guide backgrounds are colored.
    /// This setting can take the following two values:
    ///
    /// 1. "disabled"
    /// 2. "indent_aware"
    "background_coloring": "disabled"
  },
  // Whether the editor will scroll beyond the last line.
  "scroll_beyond_last_line": "one_page",
  // The number of lines to keep above/below the cursor when scrolling.
  "vertical_scroll_margin": 3,
  // Whether to scroll when clicking near the edge of the visible text area.
  "autoscroll_on_clicks": false,
  // The number of characters to keep on either side when scrolling with the mouse
  "horizontal_scroll_margin": 5,
  // Scroll sensitivity multiplier. This multiplier is applied
  // to both the horizontal and vertical delta values while scrolling.
  "scroll_sensitivity": 1.0,
  "relative_line_numbers": false,
  // If 'search_wrap' is disabled, search result do not wrap around the end of the file.
  "search_wrap": true,
  // Search options to enable by default when opening new project and buffer searches.
  "search": {
    "whole_word": false,
    "case_sensitive": false,
    "include_ignored": false,
    "regex": false
  },
  // When to populate a new search's query based on the text under the cursor.
  // This setting can take the following three values:
  //
  // 1. Always populate the search query with the word under the cursor (default).
  //    "always"
  // 2. Only populate the search query when there is text selected
  //    "selection"
  // 3. Never populate the search query
  //    "never"
  "seed_search_query_from_cursor": "always",
  "use_smartcase_search": false,
  // Inlay hint related settings
  "inlay_hints": {
    // Global switch to toggle hints on and off, switched off by default.
    "enabled": false,
    // Toggle certain types of hints on and off, all switched on by default.
    "show_type_hints": true,
    "show_parameter_hints": true,
    // Corresponds to null/None LSP hint type value.
    "show_other_hints": true,
    // Whether to show a background for inlay hints.
    //
    // If set to `true`, the background will use the `hint.background` color from the current theme.
    "show_background": false,
    // Time to wait after editing the buffer, before requesting the hints,
    // set to 0 to disable debouncing.
    "edit_debounce_ms": 700,
    // Time to wait after scrolling the buffer, before requesting the hints,
    // set to 0 to disable debouncing.
    "scroll_debounce_ms": 50
  },
  "project_panel": {
    // Whether to show the project panel button in the status bar
    "button": true,
    // Default width of the project panel.
    "default_width": 240,
    // Where to dock the project panel. Can be 'left' or 'right'.
    "dock": "left",
    // Spacing between worktree entries in the project panel. Can be 'comfortable' or 'standard'.
    "entry_spacing": "comfortable",
    // Whether to show file icons in the project panel.
    "file_icons": true,
    // Whether to show folder icons or chevrons for directories in the project panel.
    "folder_icons": true,
    // Whether to show the git status in the project panel.
    "git_status": true,
    // Amount of indentation for nested items.
    "indent_size": 20,
    // Whether to reveal it in the project panel automatically,
    // when a corresponding project entry becomes active.
    // Gitignored entries are never auto revealed.
    "auto_reveal_entries": true,
    // Whether to fold directories automatically and show compact folders
    // (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
    "auto_fold_dirs": true,
    /// Scrollbar-related settings
    "scrollbar": {
      /// When to show the scrollbar in the project panel.
      /// This setting can take four values:
      ///
      /// 1. null (default): Inherit editor settings
      /// 2. Show the scrollbar if there's important information or
      ///    follow the system's configured behavior (default):
      ///   "auto"
      /// 3. Match the system's configured behavior:
      ///    "system"
      /// 4. Always show the scrollbar:
      ///    "always"
      /// 5. Never show the scrollbar:
      ///    "never"
      "show": null
    },
    /// Which files containing diagnostic errors/warnings to mark in the project panel.
    /// This setting can take the following three values:
    ///
    /// 1. Do not mark any files:
    ///    "off"
    /// 2. Only mark files with errors:
    ///    "errors"
    /// 3. Mark files with errors and warnings:
    ///    "all"
    "show_diagnostics": "all",
    // Settings related to indent guides in the project panel.
    "indent_guides": {
      // When to show indent guides in the project panel.
      // This setting can take two values:
      //
      // 1. Always show indent guides:
      //    "always"
      // 2. Never show indent guides:
      //    "never"
      "show": "always"
    }
  },
  "outline_panel": {
    // Whether to show the outline panel button in the status bar
    "button": true,
    // Default width of the outline panel.
    "default_width": 300,
    // Where to dock the outline panel. Can be 'left' or 'right'.
    "dock": "left",
    // Whether to show file icons in the outline panel.
    "file_icons": true,
    // Whether to show folder icons or chevrons for directories in the outline panel.
    "folder_icons": true,
    // Whether to show the git status in the outline panel.
    "git_status": true,
    // Amount of indentation for nested items.
    "indent_size": 20,
    // Whether to reveal it in the outline panel automatically,
    // when a corresponding outline entry becomes active.
    // Gitignored entries are never auto revealed.
    "auto_reveal_entries": true,
    /// Whether to fold directories automatically
    /// when a directory has only one directory inside.
    "auto_fold_dirs": true,
    // Settings related to indent guides in the outline panel.
    "indent_guides": {
      // When to show indent guides in the outline panel.
      // This setting can take two values:
      //
      // 1. Always show indent guides:
      //    "always"
      // 2. Never show indent guides:
      //    "never"
      "show": "always"
    },
    /// Scrollbar-related settings
    "scrollbar": {
      /// When to show the scrollbar in the project panel.
      /// This setting can take four values:
      ///
      /// 1. null (default): Inherit editor settings
      /// 2. Show the scrollbar if there's important information or
      ///    follow the system's configured behavior (default):
      ///   "auto"
      /// 3. Match the system's configured behavior:
      ///    "system"
      /// 4. Always show the scrollbar:
      ///    "always"
      /// 5. Never show the scrollbar:
      ///    "never"
      "show": null
    }
  },
  "collaboration_panel": {
    // Whether to show the collaboration panel button in the status bar.
    "button": true,
    // Where to dock the collaboration panel. Can be 'left' or 'right'.
    "dock": "left",
    // Default width of the collaboration panel.
    "default_width": 240
  },
  "chat_panel": {
    // When to show the chat panel button in the status bar.
    // Can be 'never', 'always', or 'when_in_call',
    // or a boolean (interpreted as 'never'/'always').
    "button": "when_in_call",
    // Where to the chat panel. Can be 'left' or 'right'.
    "dock": "right",
    // Default width of the chat panel.
    "default_width": 240
  },
  "git_panel": {
    // Whether to show the git panel button in the status bar.
    "button": true,
    // Where to the git panel. Can be 'left' or 'right'.
    "dock": "left",
    // Default width of the git panel.
    "default_width": 360,
    // Style of the git status indicator in the panel.
    //
    // Default: icon
    "status_style": "icon",
    "scrollbar": {
      // When to show the scrollbar in the git panel.
      //
      // Default: inherits editor scrollbar settings
      "show": null
    }
  },
  "message_editor": {
    // Whether to automatically replace emoji shortcodes with emoji characters.
    // For example: typing `:wave:` gets replaced with `👋`.
    "auto_replace_emoji_shortcode": true
  },
  "notification_panel": {
    // Whether to show the notification panel button in the status bar.
    "button": true,
    // Where to dock the notification panel. Can be 'left' or 'right'.
    "dock": "right",
    // Default width of the notification panel.
    "default_width": 380
  },
  "assistant": {
    // Version of this setting.
    "version": "2",
    // Whether the assistant is enabled.
    "enabled": true,
    // Whether to show the assistant panel button in the status bar.
    "button": true,
    // Where to dock the assistant panel. Can be 'left', 'right' or 'bottom'.
    "dock": "right",
    // Default width when the assistant is docked to the left or right.
    "default_width": 640,
    // Default height when the assistant is docked to the bottom.
    "default_height": 320,
    // The default model to use when creating new chats.
    "default_model": {
      // The provider to use.
      "provider": "zed.dev",
      // The model to use.
      "model": "claude-3-5-sonnet"
    }
  },
  // The settings for slash commands.
  "slash_commands": {
    // Settings for the `/docs` slash command.
    "docs": {
      // Whether `/docs` is enabled.
      "enabled": false
    },
    // Settings for the `/project` slash command.
    "project": {
      // Whether `/project` is enabled.
      "enabled": false
    }
  },
  // Whether the screen sharing icon is shown in the os status bar.
  "show_call_status_icon": true,
  // Whether to use language servers to provide code intelligence.
  "enable_language_server": true,
  // Whether to perform linked edits of associated ranges, if the language server supports it.
  // For example, when editing opening <html> tag, the contents of the closing </html> tag will be edited as well.
  "linked_edits": true,
  // The list of language servers to use (or disable) for all languages.
  //
  // This is typically customized on a per-language basis.
  "language_servers": ["..."],
  // When to automatically save edited buffers. This setting can
  // take four values.
  //
  // 1. Never automatically save:
  //     "autosave": "off",
  // 2. Save when changing focus away from the Zed window:
  //     "autosave": "on_window_change",
  // 3. Save when changing focus away from a specific buffer:
  //     "autosave": "on_focus_change",
  // 4. Save when idle for a certain amount of time:
  //     "autosave": { "after_delay": {"milliseconds": 500} },
  "autosave": "off",
  // Maximum number of tabs per pane. Unset for unlimited.
  "max_tabs": null,
  // Settings related to the editor's tab bar.
  "tab_bar": {
    // Whether or not to show the tab bar in the editor
    "show": true,
    // Whether or not to show the navigation history buttons.
    "show_nav_history_buttons": true
  },
  // Settings related to the editor's tabs
  "tabs": {
    // Show git status colors in the editor tabs.
    "git_status": false,
    // Position of the close button on the editor tabs.
    "close_position": "right",
    // Whether to show the file icon for a tab.
    "file_icons": false,
    // Whether to always show the close button on tabs.
    "always_show_close_button": false,
    // What to do after closing the current tab.
    //
    // 1. Activate the tab that was open previously (default)
    //     "history"
    // 2. Activate the right neighbour tab if present
    //     "neighbour"
    // 3. Activate the left neighbour tab if present
    //     "left_neighbour"
    "activate_on_close": "history",
    /// Which files containing diagnostic errors/warnings to mark in the tabs.
    /// Diagnostics are only shown when file icons are also active.
    /// This setting only works when can take the following three values:
    ///
    /// 1. Do not mark any files:
    ///    "off"
    /// 2. Only mark files with errors:
    ///    "errors"
    /// 3. Mark files with errors and warnings:
    ///    "all"
    "show_diagnostics": "off"
  },
  // Settings related to preview tabs.
  "preview_tabs": {
    // Whether preview tabs should be enabled.
    // Preview tabs allow you to open files in preview mode, where they close automatically
    // when you switch to another file unless you explicitly pin them.
    // This is useful for quickly viewing files without cluttering your workspace.
    "enabled": true,
    // Whether to open tabs in preview mode when selected from the file finder.
    "enable_preview_from_file_finder": false,
    // Whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
    "enable_preview_from_code_navigation": false
  },
  // Settings related to the file finder.
  "file_finder": {
    // Whether to show file icons in the file finder.
    "file_icons": true,
    // Determines how much space the file finder can take up in relation to the available window width.
    // There are 5 possible width values:
    //
    // 1. Small: This value is essentially a fixed width.
    //    "modal_width": "small"
    // 2. Medium:
    //    "modal_width": "medium"
    // 3. Large:
    //    "modal_width": "large"
    // 4. Extra Large:
    //    "modal_width": "xlarge"
    // 5. Fullscreen: This value removes any horizontal padding, as it consumes the whole viewport width.
    //    "modal_width": "full"
    //
    // Default: small
    "modal_max_width": "small"
  },
  // Whether or not to remove any trailing whitespace from lines of a buffer
  // before saving it.
  "remove_trailing_whitespace_on_save": true,
  // Whether to start a new line with a comment when a previous line is a comment as well.
  "extend_comment_on_newline": true,
  // Whether or not to ensure there's a single newline at the end of a buffer
  // when saving it.
  "ensure_final_newline_on_save": true,
  // Whether or not to perform a buffer format before saving
  //
  // Keep in mind, if the autosave with delay is enabled, format_on_save will be ignored
  "format_on_save": "on",
  // How to perform a buffer format. This setting can take 4 values:
  //
  // 1. Format code using the current language server:
  //     "formatter": "language_server"
  // 2. Format code using an external command:
  //     "formatter": {
  //       "external": {
  //         "command": "prettier",
  //         "arguments": ["--stdin-filepath", "{buffer_path}"]
  //       }
  //     }
  // 3. Format code using Zed's Prettier integration:
  //     "formatter": "prettier"
  // 4. Default. Format files using Zed's Prettier integration (if applicable),
  //    or falling back to formatting via language server:
  //     "formatter": "auto"
  "formatter": "auto",
  // How to soft-wrap long lines of text.
  // Possible values:
  //
  // 1. Prefer a single line generally, unless an overly long line is encountered.
  //      "soft_wrap": "none",
  //      "soft_wrap": "prefer_line", // (deprecated, same as "none")
  // 2. Soft wrap lines that overflow the editor.
  //      "soft_wrap": "editor_width",
  // 3. Soft wrap lines at the preferred line length.
  //      "soft_wrap": "preferred_line_length",
  // 4. Soft wrap lines at the preferred line length or the editor width (whichever is smaller).
  //      "soft_wrap": "bounded",
  "soft_wrap": "none",
  // The column at which to soft-wrap lines, for buffers where soft-wrap
  // is enabled.
  "preferred_line_length": 80,
  // Whether to indent lines using tab characters, as opposed to multiple
  // spaces.
  "hard_tabs": false,
  // How many columns a tab should occupy.
  "tab_size": 4,
  // Control what info is collected by Zed.
  "telemetry": {
    // Send debug info like crash reports.
    "diagnostics": true,
    // Send anonymized usage data like what languages you're using Zed with.
    "metrics": true
  },
  // Automatically update Zed. This setting may be ignored on Linux if
  // installed through a package manager.
  "auto_update": true,
  // Diagnostics configuration.
  "diagnostics": {
    // Whether to show warnings or not by default.
    "include_warnings": true
  },
  // Add files or globs of files that will be excluded by Zed entirely:
  // they will be skipped during FS scan(s), file tree and file search
  // will lack the corresponding file entries. Overrides `file_scan_inclusions`.
  "file_scan_exclusions": [
    "**/.git",
    "**/.svn",
    "**/.hg",
    "**/.jj",
    "**/CVS",
    "**/.DS_Store",
    "**/Thumbs.db",
    "**/.classpath",
    "**/.settings"
  ],
  // Add files or globs of files that will be included by Zed, even when
  // ignored by git. This is useful for files that are not tracked by git,
  // but are still important to your project. Note that globs that are
  // overly broad can slow down Zed's file scanning. Overridden by `file_scan_exclusions`.
  "file_scan_inclusions": [".env*"],
  // Git gutter behavior configuration.
  "git": {
    // Control whether the git gutter is shown. May take 2 values:
    // 1. Show the gutter
    //      "git_gutter": "tracked_files"
    // 2. Hide the gutter
    //      "git_gutter": "hide"
    "git_gutter": "tracked_files",
    // Control whether the git blame information is shown inline,
    // in the currently focused line.
    "inline_blame": {
      "enabled": true
      // Sets a delay after which the inline blame information is shown.
      // Delay is restarted with every cursor movement.
      // "delay_ms": 600
      //
      // Whether or not to display the git commit summary on the same line.
      // "show_commit_summary": false
      //
      // The minimum column number to show the inline blame information at
      // "min_column": 0
    }
  },
  // Configuration for how direnv configuration should be loaded. May take 2 values:
  // 1. Load direnv configuration using `direnv export json` directly.
  //      "load_direnv": "direct"
  // 2. Load direnv configuration through the shell hook, works for POSIX shells and fish.
  //      "load_direnv": "shell_hook"
  "load_direnv": "direct",
  "inline_completions": {
    // A list of globs representing files that inline completions should be disabled for.
    "disabled_globs": [
      "**/.env*",
      "**/*.pem",
      "**/*.key",
      "**/*.cert",
      "**/*.crt",
      "**/secrets.yml"
    ]
  },
  // Settings specific to journaling
  "journal": {
    // The path of the directory where journal entries are stored
    "path": "~",
    // What format to display the hours in
    // May take 2 values:
    // 1. hour12
    // 2. hour24
    "hour_format": "hour12"
  },
  // Settings specific to the terminal
  "terminal": {
    // What shell to use when opening a terminal. May take 3 values:
    // 1. Use the system's default terminal configuration in /etc/passwd
    //      "shell": "system"
    // 2. A program:
    //      "shell": {
    //        "program": "sh"
    //      }
    // 3. A program with arguments:
    //     "shell": {
    //         "with_arguments": {
    //           "program": "/bin/bash",
    //           "args": ["--login"]
    //         }
    //     }
    "shell": "system",
    // Where to dock terminals panel. Can be `left`, `right`, `bottom`.
    "dock": "bottom",
    // Default width when the terminal is docked to the left or right.
    "default_width": 640,
    // Default height when the terminal is docked to the bottom.
    "default_height": 320,
    // What working directory to use when launching the terminal.
    // May take 4 values:
    // 1. Use the current file's project directory.  Will Fallback to the
    //    first project directory strategy if unsuccessful
    //      "working_directory": "current_project_directory"
    // 2. Use the first project in this workspace's directory
    //      "working_directory": "first_project_directory"
    // 3. Always use this platform's home directory (if we can find it)
    //     "working_directory": "always_home"
    // 4. Always use a specific directory. This value will be shell expanded.
    //    If this path is not a valid directory the terminal will default to
    //    this platform's home directory  (if we can find it)
    //      "working_directory": {
    //        "always": {
    //          "directory": "~/zed/projects/"
    //        }
    //      }
    "working_directory": "current_project_directory",
    // Set the cursor blinking behavior in the terminal.
    // May take 3 values:
    //  1. Never blink the cursor, ignoring the terminal mode
    //         "blinking": "off",
    //  2. Default the cursor blink to off, but allow the terminal to
    //     set blinking
    //         "blinking": "terminal_controlled",
    //  3. Always blink the cursor, ignoring the terminal mode
    //         "blinking": "on",
    "blinking": "terminal_controlled",
    // Default cursor shape for the terminal.
    //  1. A block that surrounds the following character
    //     "block"
    //  2. A vertical bar
    //     "bar"
    //  3. An underline / underscore that runs along the following character
    //     "underline"
    //  4. A box drawn around the following character
    //     "hollow"
    //
    // Default: not set, defaults to "block"
    "cursor_shape": null,
    // Set whether Alternate Scroll mode (code: ?1007) is active by default.
    // Alternate Scroll mode converts mouse scroll events into up / down key
    // presses when in the alternate screen (e.g. when running applications
    // like vim or  less). The terminal can still set and unset this mode.
    // May take 2 values:
    //  1. Default alternate scroll mode to on
    //         "alternate_scroll": "on",
    //  2. Default alternate scroll mode to off
    //         "alternate_scroll": "off",
    "alternate_scroll": "off",
    // Set whether the option key behaves as the meta key.
    // May take 2 values:
    //  1. Rely on default platform handling of option key, on macOS
    //     this means generating certain unicode characters
    //         "option_as_meta": false,
    //  2. Make the option keys behave as a 'meta' key, e.g. for emacs
    //         "option_as_meta": true,
    "option_as_meta": false,
    // Whether or not selecting text in the terminal will automatically
    // copy to the system clipboard.
    "copy_on_select": false,
    // Whether to show the terminal button in the status bar
    "button": true,
    // Any key-value pairs added to this list will be added to the terminal's
    // environment. Use `:` to separate multiple values.
    "env": {
      // "KEY": "value1:value2"
    },
    // Set the terminal's line height.
    // May take 3 values:
    //  1. Use a line height that's comfortable for reading, 1.618
    //         "line_height": "comfortable"
    //  2. Use a standard line height, 1.3. This option is useful for TUIs,
    //      particularly if they use box characters
    //         "line_height": "standard",
    //  3. Use a custom line height.
    //         "line_height": {
    //           "custom": 2
    //         },
    "line_height": "comfortable",
    // Activate the python virtual environment, if one is found, in the
    // terminal's working directory (as resolved by the working_directory
    // setting). Set this to "off" to disable this behavior.
    "detect_venv": {
      "on": {
        // Default directories to search for virtual environments, relative
        // to the current working directory. We recommend overriding this
        // in your project's settings, rather than globally.
        "directories": [".env", "env", ".venv", "venv"],
        // Can also be `csh`, `fish`, `nushell` and `power_shell`
        "activate_script": "default"
      }
    },
    "toolbar": {
      // Whether to display the terminal title in its toolbar's breadcrumbs.
      // Only shown if the terminal title is not empty.
      //
      // The shell running in the terminal needs to be configured to emit the title.
      // Example: `echo -e "\e]2;New Title\007";`
      "breadcrumbs": true
    },
    /// Scrollbar-related settings
    "scrollbar": {
      /// When to show the scrollbar in the terminal.
      /// This setting can take four values:
      ///
      /// 1. null (default): Inherit editor settings
      /// 2. Show the scrollbar if there's important information or
      ///    follow the system's configured behavior (default):
      ///   "auto"
      /// 3. Match the system's configured behavior:
      ///    "system"
      /// 4. Always show the scrollbar:
      ///    "always"
      /// 5. Never show the scrollbar:
      ///    "never"
      "show": null
    }
    // Set the terminal's font size. If this option is not included,
    // the terminal will default to matching the buffer's font size.
    // "font_size": 15,
    // Set the terminal's font family. If this option is not included,
    // the terminal will default to matching the buffer's font family.
    // "font_family": "Zed Plex Mono",
    // Set the terminal's font fallbacks. If this option is not included,
    // the terminal will default to matching the buffer's font fallbacks.
    // This will be merged with the platform's default font fallbacks
    // "font_fallbacks": ["FiraCode Nerd Fonts"],
    // Sets the maximum number of lines in the terminal's scrollback buffer.
    // Default: 10_000, maximum: 100_000 (all bigger values set will be treated as 100_000), 0 disables the scrolling.
    // Existing terminals will not pick up this change until they are recreated.
    // "max_scroll_history_lines": 10000,
  },
  "code_actions_on_format": {},
  /// Settings related to running tasks.
  "tasks": {
    "variables": {}
  },
  // An object whose keys are language names, and whose values
  // are arrays of filenames or extensions of files that should
  // use those languages.
  //
  // For example, to treat files like `foo.notjs` as JavaScript,
  // and `Embargo.lock` as TOML:
  //
  // {
  //   "JavaScript": ["notjs"],
  //   "TOML": ["Embargo.lock"]
  // }
  //
  "file_types": {
    "Plain Text": ["txt"],
    "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
    "Shell Script": [".env.*"]
  },
  /// By default use a recent system version of node, or install our own.
  /// You can override this to use a version of node that is not in $PATH with:
  /// {
  ///   "node": {
  ///     "path": "/path/to/node"
  ///     "npm_path": "/path/to/npm" (defaults to node_path/../npm)
  ///   }
  /// }
  /// or to ensure Zed always downloads and installs an isolated version of node:
  /// {
  ///   "node": {
  ///     "ignore_system_version": true,
  ///   }
  /// NOTE: changing this setting currently requires restarting Zed.
  "node": {},
  // The extensions that Zed should automatically install on startup.
  //
  // If you don't want any of these extensions, add this field to your settings
  // and change the value to `false`.
  "auto_install_extensions": {
    "html": true
  },
  // Different settings for specific languages.
  "languages": {
    "Astro": {
      "language_servers": ["astro-language-server", "..."],
      "prettier": {
        "allowed": true,
        "plugins": ["prettier-plugin-astro"]
      }
    },
    "Blade": {
      "prettier": {
        "allowed": true
      }
    },
    "C": {
      "format_on_save": "off",
      "use_on_type_format": false,
      "prettier": {
        "allowed": false
      }
    },
    "C++": {
      "format_on_save": "off",
      "use_on_type_format": false,
      "prettier": {
        "allowed": false
      }
    },
    "CSS": {
      "prettier": {
        "allowed": true
      }
    },
    "Dart": {
      "tab_size": 2
    },
    "Diff": {
      "remove_trailing_whitespace_on_save": false,
      "ensure_final_newline_on_save": false
    },
    "Elixir": {
      "language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."]
    },
    "Erlang": {
      "language_servers": ["erlang-ls", "!elp", "..."]
    },
    "Go": {
      "code_actions_on_format": {
        "source.organizeImports": true
      }
    },
    "GraphQL": {
      "prettier": {
        "allowed": true
      }
    },
    "HEEX": {
      "language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."]
    },
    "HTML": {
      "prettier": {
        "allowed": true
      }
    },
    "Java": {
      "prettier": {
        "allowed": true,
        "plugins": ["prettier-plugin-java"]
      }
    },
    "JavaScript": {
      "language_servers": ["!typescript-language-server", "vtsls", "..."],
      "prettier": {
        "allowed": true
      }
    },
    "JSON": {
      "prettier": {
        "allowed": true
      }
    },
    "JSONC": {
      "prettier": {
        "allowed": true
      }
    },
    "Markdown": {
      "format_on_save": "off",
      "use_on_type_format": false,
      "prettier": {
        "allowed": true
      }
    },
    "PHP": {
      "language_servers": ["phpactor", "!intelephense", "..."],
      "prettier": {
        "allowed": true,
        "plugins": ["@prettier/plugin-php"],
        "parser": "php"
      }
    },
    "Ruby": {
      "language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "..."]
    },
    "SCSS": {
      "prettier": {
        "allowed": true
      }
    },
    "SQL": {
      "prettier": {
        "allowed": true,
        "plugins": ["prettier-plugin-sql"]
      }
    },
    "Starlark": {
      "language_servers": ["starpls", "!buck2-lsp", "..."]
    },
    "Svelte": {
      "language_servers": ["svelte-language-server", "..."],
      "prettier": {
        "allowed": true,
        "plugins": ["prettier-plugin-svelte"]
      }
    },
    "TSX": {
      "language_servers": ["!typescript-language-server", "vtsls", "..."],
      "prettier": {
        "allowed": true
      }
    },
    "Twig": {
      "prettier": {
        "allowed": true
      }
    },
    "TypeScript": {
      "language_servers": ["!typescript-language-server", "vtsls", "..."],
      "prettier": {
        "allowed": true
      }
    },
    "Vue.js": {
      "language_servers": ["vue-language-server", "..."],
      "prettier": {
        "allowed": true
      }
    },
    "XML": {
      "prettier": {
        "allowed": true,
        "plugins": ["@prettier/plugin-xml"]
      }
    },
    "YAML": {
      "prettier": {
        "allowed": true
      }
    },
    "Zig": {
      "language_servers": ["zls", "..."]
    }
  },
  // Different settings for specific language models.
  "language_models": {
    "anthropic": {
      "version": "1",
      "api_url": "https://api.anthropic.com"
    },
    "google": {
      "api_url": "https://generativelanguage.googleapis.com"
    },
    "ollama": {
      "api_url": "http://localhost:11434"
    },
    "openai": {
      "version": "1",
      "api_url": "https://api.openai.com/v1"
    },
    "lmstudio": {
      "api_url": "http://localhost:1234/api/v0"
    },
    "deepseek": {
      "api_url": "https://api.deepseek.com"
    }
  },
  // Zed's Prettier integration settings.
  // Allows to enable/disable formatting with Prettier
  // and configure default Prettier, used when no project-level Prettier installation is found.
  "prettier": {
    // // Whether to consider prettier formatter or not when attempting to format a file.
    // "allowed": false,
    //
    // // Use regular Prettier json configuration.
    // // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
    // // the project has no other Prettier installed.
    // "plugins": [],
    //
    // // Use regular Prettier json configuration.
    // // If Prettier is allowed, Zed will use this for its Prettier instance for any applicable file, if
    // // the project has no other Prettier installed.
    // "trailingComma": "es5",
    // "tabWidth": 4,
    // "semi": false,
    // "singleQuote": true
  },
  // LSP Specific settings.
  "lsp": {
    // Specify the LSP name as a key here.
    // "rust-analyzer": {
    //     // These initialization options are merged into Zed's defaults
    //     "initialization_options": {
    //         "check": {
    //             "command": "clippy" // rust-analyzer.check.command (default: "check")
    //         }
    //     }
    // }
  },
  // Jupyter settings
  "jupyter": {
    "enabled": true
    // Specify the language name as the key and the kernel name as the value.
    // "kernel_selections": {
    //    "python": "conda-base"
    //    "typescript": "deno"
    // }
  },
  // Vim settings
  "vim": {
    "toggle_relative_line_numbers": false,
    "use_system_clipboard": "always",
    "use_multiline_find": false,
    "use_smartcase_find": false,
    "highlight_on_yank_duration": 200,
    "custom_digraphs": {}
  },
  // The server to connect to. If the environment variable
  // ZED_SERVER_URL is set, it will override this setting.
  "server_url": "https://zed.dev",
  // Settings overrides to use when using Zed Preview.
  // Mostly useful for developers who are managing multiple instances of Zed.
  "preview": {
    // "theme": "Andromeda"
  },
  // Settings overrides to use when using Zed Nightly.
  // Mostly useful for developers who are managing multiple instances of Zed.
  "nightly": {
    // "theme": "Andromeda"
  },
  // Settings overrides to use when using Zed Stable.
  // Mostly useful for developers who are managing multiple instances of Zed.
  "stable": {
    // "theme": "Andromeda"
  },
  // Settings overrides to use when using Zed Dev.
  // Mostly useful for developers who are managing multiple instances of Zed.
  "dev": {
    // "theme": "Andromeda"
  },
  // Task-related settings.
  "task": {
    // Whether to show task status indicator in the status bar. Default: true
    "show_status_indicator": true
  },
  // Whether to show full labels in line indicator or short ones
  //
  // Values:
  //   - `short`: "2 s, 15 l, 32 c"
  //   - `long`: "2 selections, 15 lines, 32 characters"
  // Default: long
  "line_indicator_format": "long",
  // Set a proxy to use. The proxy protocol is specified by the URI scheme.
  //
  // Supported URI scheme: `http`, `https`, `socks4`, `socks4a`, `socks5`,
  // `socks5h`. `http` will be used when no scheme is specified.
  //
  // By default no proxy will be used, or Zed will try get proxy settings from
  // environment variables.
  //
  // Examples:
  //   - "proxy": "socks5h://localhost:10808"
  //   - "proxy": "http://127.0.0.1:10809"
  "proxy": null,
  // Set to configure aliases for the command palette.
  // When typing a query which is a key of this object, the value will be used instead.
  //
  // Examples:
  // {
  //   "W": "workspace::Save"
  // }
  "command_aliases": {},
  // Whether to show user picture in titlebar.
  "show_user_picture": true,
  // ssh_connections is an array of ssh connections.
  // You can configure these from `project: Open Remote` in the command palette.
  // Zed's ssh support will pull configuration from your ~/.ssh too.
  // Examples:
  // [
  //   {
  //     "host": "example-box",
  //     // "port": 22, "username": "test", "args": ["-i", "/home/user/.ssh/id_rsa"]
  //     "projects": [
  //       {
  //         "paths": ["/home/user/code/zed"]
  //       }
  //     ]
  //   }
  // ]
  "ssh_connections": [],
  // Configures context servers for use in the Assistant.
  "context_servers": {}
}
posted @   qsBye  阅读(289)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
历史上的今天:
2024-02-02 Linux运维笔记[14]-搭建内网docker镜像服务
点击右上角即可分享
微信分享提示