Skip to content

Instantly share code, notes, and snippets.

@joeldrapper
Last active June 26, 2024 09:03
Show Gist options
  • Save joeldrapper/bf5cfe4601a5abd661fb9c36e2fa42f2 to your computer and use it in GitHub Desktop.
Save joeldrapper/bf5cfe4601a5abd661fb9c36e2fa42f2 to your computer and use it in GitHub Desktop.
My Zed Config
[
{
"context": "Editor",
"bindings": {
"alt-up": "editor::SelectLargerSyntaxNode",
"alt-down": "editor::SelectSmallerSyntaxNode",
"ctrl-cmd-up": "editor::MoveLineUp",
"ctrl-cmd-down": "editor::MoveLineDown"
}
}
]
{
"assistant": {
"default_open_ai_model": "gpt-4",
"provider": {
"name": "openai",
"default_model": "gpt-4"
}
},
"vim_mode": true,
"features": {
"copilot": true
},
"show_inline_completions": true,
"theme": "Rosé Pine Moon",
"buffer_font_family": "Monolisa Variable",
"soft_wrap": "editor_width",
"hard_tabs": true,
"tab_size": 2,
"format_on_save": "on",
"buffer_font_size": 16,
"buffer_line_height": {
"custom": 1.7
},
"indent_guides": {
"enabled": false
},
"tab_bar": {
"show": true
},
"semantic_index": {
"enabled": true
},
"lsp": {
"solargraph": {
"initialization_options": {
"diagnostics": false,
"formatting": false
}
},
"ruby-lsp": {
"initialization_options": {
"diagnostics": true,
"formatting": false
}
},
"tailwindcss-language-server": {
"settings": {
"includeLanguages": {
"erb": "html",
"ruby": "html"
},
"experimental": {
"classRegex": ["\\bclass:\\s*['\"]([^'\"]*)['\"]"]
}
}
}
},
"languages": {
"Ruby": {
"language_servers": [
"tailwindcss-language-server",
"ruby-lsp",
"!solargraph"
],
"formatter": {
"external": {
"command": "bundle",
"arguments": [
"exec",
"rubocop",
"--server",
"--auto-correct-all",
"--fail-level",
"error",
"--stdin",
"corrected.rb",
"--stderr"
]
}
}
},
"Markdown": {
"soft_wrap": "preferred_line_length",
"preferred_line_length": 80,
"hard_tabs": false
},
"YAML": {
"hard_tabs": false
}
},
"file_scan_exclusions": ["*.git", "*.DS_Store"]
}
@joeldrapper
Copy link
Author

You can disable it by setting format on save to off. You may want to disable it globally and then enable it for specific projects with a .zed/settings.json file in the project.

@MSchmidt
Copy link

Thanks Joel. Sounds like a reasonable approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment