Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'book/src/languages.md')
| -rw-r--r-- | book/src/languages.md | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/book/src/languages.md b/book/src/languages.md index b47c05cf..8db121ce 100644 --- a/book/src/languages.md +++ b/book/src/languages.md @@ -66,15 +66,13 @@ These configuration keys are available: | `indent` | The indent to use. Has sub keys `unit` (the text inserted into the document when indenting; usually set to N spaces or `"\t"` for tabs) and `tab-width` (the number of spaces rendered for a tab) | | `language-servers` | The Language Servers used for this language. See below for more information in the section [Configuring Language Servers for a language](#configuring-language-servers-for-a-language) | | `grammar` | The tree-sitter grammar to use (defaults to the value of `name`) | -| `formatter` | The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout. The filename of the current buffer can be passed as argument by using the `%{buffer_name}` expansion variable. See below for more information in the [Configuring the formatter command](#configuring-the-formatter-command) | +| `formatter` | The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout | | `soft-wrap` | [editor.softwrap](./editor.md#editorsoft-wrap-section) | `text-width` | Maximum line length. Used for the `:reflow` command and soft-wrapping if `soft-wrap.wrap-at-text-width` is set, defaults to `editor.text-width` | | `rulers` | Overrides the `editor.rulers` config key for the language. | | `path-completion` | Overrides the `editor.path-completion` config key for the language. | -| `word-completion` | Overrides the [`editor.word-completion`](./editor.md#editorword-completion-section) configuration for the language. | | `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml`. Overwrites the setting of the same name in `config.toml` if set. | | `persistent-diagnostic-sources` | An array of LSP diagnostic sources assumed unchanged when the language server resends the same set of diagnostics. Helix can track the position for these diagnostics internally instead. Useful for diagnostics that are recomputed on save. -| `rainbow-brackets` | Overrides the `editor.rainbow-brackets` config key for the language | ### File-type detection and the `file-types` key @@ -104,16 +102,6 @@ with the following priorities: the file extension of a given file wins. In the example above, the `"toml"` config matches files like `Cargo.toml` or `languages.toml`. -### Configuring the formatter command - -[Command line expansions](./command-line.md#expansions) are supported in the arguments -of the formatter command. In particular, the `%{buffer_name}` variable can be passed as -argument to the formatter: - -```toml -formatter = { command = "mylang-formatter" , args = ["--stdin", "--stdin-filename", "%{buffer_name}"] } -``` - ## Language Server configuration Language servers are configured separately in the table `language-server` in the same file as the languages `languages.toml` |