Skip to content

Instantly share code, notes, and snippets.

@mdouchement
Last active January 3, 2025 03:38
Show Gist options
  • Save mdouchement/eb8684be330a09bebe66dbf91af16516 to your computer and use it in GitHub Desktop.
Save mdouchement/eb8684be330a09bebe66dbf91af16516 to your computer and use it in GitHub Desktop.
Zed 0.164.2 Editor configuration for Golang
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
// Other guide: https://www.kevnu.com/en/posts/10
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"ui_font_size": 16,
"buffer_font_size": 16,
"buffer_font_family": "Source Code Pro for Powerline",
"tab_size": 2,
"hour_format": "hour24",
"theme": {
"mode": "system",
"light": "monokai Darker Classic",
"dark": "One Dark"
},
"telemetry": {
"diagnostics": false,
"metrics": false
},
"format_on_save": "off", // Global formating for any type of files breaks a lot of things for existing projects.
"languages": {
"Go": {
"format_on_save": "on",
"code_actions_on_format": {
"source.organizeImports": true
}
}
},
"lsp": {
"gopls": { // https://github.com/golang/tools/blob/master/gopls/doc/settings.md
"initialization_options": {
"directoryFilters": [
"-**/node_modules",
"-**/.git"
],
"formatting.gofumpt": true,
"symbolScope": "workspace",
"staticcheck": true,
"templateExtensions": [
"tmpl"
],
"experimentalPostfixCompletions": true,
"analyses": {
"nilness": true,
"unusedparams": true,
"unusedvariable": true,
"unusedwrite": true,
"useany": true
},
"codelenses": {
"gc_details": true
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment