docs: Validate JSON snippets (settings, keymap, tasks, etc) (#40043)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Ben Kunkle
2025-10-12 00:19:57 -04:00
committed by GitHub
parent deef58bef7
commit abe1fd5e16
74 changed files with 849 additions and 640 deletions
+8 -8
View File
@@ -41,7 +41,7 @@ If `gopls` is not found you will likely need to add `export PATH="$PATH:$HOME/go
Zed sets the following initialization options for inlay hints:
```json
```json [settings]
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
@@ -57,12 +57,12 @@ to make the language server send back inlay hints when Zed has them enabled in t
Use
```json
```json [settings]
"lsp": {
"gopls": {
"initialization_options": {
"hints": {
....
// ....
}
}
}
@@ -83,7 +83,7 @@ For more control, you can add debug configurations to `.zed/debug.json`. See bel
To debug a specific package, you can do so by setting the Delve mode to "debug". In this case "program" should be set to the package name.
```json
```json [debug]
[
{
"label": "Go (Delve)",
@@ -110,7 +110,7 @@ To debug a specific package, you can do so by setting the Delve mode to "debug".
To debug the tests for a package, set the Delve mode to "test".
The "program" is still the package name, and you can use the "buildFlags" to do things like set tags, and the "args" to set args on the test binary. (See `go help testflags` for more information on doing that).
```json
```json [debug]
[
{
"label": "Run integration tests",
@@ -130,7 +130,7 @@ The "program" is still the package name, and you can use the "buildFlags" to do
If you need to build your application with a specific command, you can use the "exec" mode of Delve. In this case "program" should point to an executable,
and the "build" command should build that.
```json
```json [debug]
[
{
"label": "Debug Prebuilt Unit Tests",
@@ -160,7 +160,7 @@ and the "build" command should build that.
You might find yourself needing to connect to an existing instance of Delve that's not necessarily running on your machine; in such case, you can use `tcp_arguments` to instrument Zed's connection to Delve.
```json
```json [debug]
[
{
"adapter": "Delve",
@@ -172,7 +172,7 @@ You might find yourself needing to connect to an existing instance of Delve that
"request": "launch",
"mode": "exec",
"stopOnEntry": false,
"tcp_connection": { "host": "123.456.789.012", "port": 53412 }
"tcp_connection": { "host": "127.0.0.1", "port": 53412 }
}
]
```