-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Neovim LSP Config | ||
|
||
Example config when using [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typos_lsp): | ||
|
||
```lua | ||
require('lspconfig').typos_lsp.setup({ | ||
-- Logging level of the language server. Logs appear in :LspLog. Defaults to error. | ||
cmd_env = { RUST_LOG = "error" } | ||
init_options = { | ||
-- Custom config. Used together with any workspace config files, taking precedence for | ||
-- settings declared in both. Equivalent to the typos `--config` cli argument. | ||
config = '~/code/typos-lsp/crates/typos-lsp/tests/typos.toml', | ||
-- How typos are rendered in the editor, eg: as errors, warnings, information, or hints. | ||
-- Defaults to error. | ||
diagnosticSeverity = "Error" | ||
} | ||
}) | ||
|
||
-- Enable debug logs for the LSP client. Recommended for debugging only. | ||
vim.lsp.set_log_level("debug") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# VS Code Settings | ||
|
||
This extension contributes the following settings: | ||
|
||
- `typos.config`: Custom config. Used together with any workspace config files, taking precedence for settings declared in both. Equivalent to the typos `--config` [cli argument](https://github.com/crate-ci/typos/blob/master/docs/reference.md). | ||
- `typos.diagnosticSeverity`: How typos are rendered in the editor, eg: as errors, warnings, information, or hints. | ||
- `typos.logLevel`: Logging level of the language server. Logs appear in the _Output -> Typos_ pane. | ||
- `typos.path`: Path to the `typos-lsp` binary. If empty the bundled binary will be used. | ||
- `typos.trace.server`: Traces the communication between VS Code and the language server. Recommended for debugging only. | ||
|
||
To disable `typos` per workspace, see [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension). | ||
|
||
## VS Code Commands | ||
|
||
| Command | Description | | ||
| -------------- | ------------------- | | ||
| Typos: Restart | Restart the server. | |