Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Zed configuration #113

Merged
merged 5 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
- VSCodium: Install [Typos spell checker](https://open-vsx.org/extension/tekumara/typos-vscode) from the Open VSX Registry.
- Neovim: Install `typos-lsp` using [mason](https://mason-registry.dev/registry/list#typos-lsp) or download `typos-lsp` from the [releases page](https://github.com/tekumara/typos-lsp/releases).
- Helix: Download `typos-lsp` from the [releases page](https://github.com/tekumara/typos-lsp/releases) and place it on your PATH.
- Zed: Install [Typos](https://zed.dev/extensions?q=typos) from Zed's extension marketplace.
- Other clients: Download `typos-lsp` from the [releases page](https://github.com/tekumara/typos-lsp/releases).

For configuration see:

- [VS Code Settings](docs/vscode-settings.md)
- [Neovim LSP config](docs/neovim-lsp-config.md)
- [Helix config](docs/helix-config.md)
- [Zed config](docs/zed-config.md)

## Features

Expand Down
33 changes: 33 additions & 0 deletions docs/zed-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Zed Settings

The Typos extension can be configured through a `.typos.toml` configuration file, which reference can be found [here](https://github.com/crate-ci/typos/blob/master/docs/reference.md).

Additionally, you can configure it in Zed's settings with the following:

```javascript
{
"lsp": {
"typos": {
"initialization_options": {
// Path to your typos config file, .typos.toml by default.
"config": ".typos.toml",
// Path to your typos-lsp executable, takes $PATH into account.
"path": "typos-lsp",
// Diagnostic severity within Zed. "Error" by default, can be:
// "Error", "Hint", "Information", "Warning"
"diagnosticSeverity": "Error",
// Minimum logging level for the LSP, displayed in Zed's logs. "info" by default, can be:
// "debug", "error", "info", "off", "trace", "warn"
"logLevel": "info",
// Traces the communication between ZED and the language server. Recommended for debugging only. "off" by default, can be:
// "messages", "off", "verbose"
"trace.server": "off"
}
}
}
}
```

**WARNING**: When modifying your Typos configuration either in `.typos.toml` or `Cargo.toml` you will need to reload the workspace to take them into account.

You do not need to reload when editing Zed's `settings.json`.