summaryrefslogtreecommitdiff
path: root/book/src/languages.md
diff options
context:
space:
mode:
Diffstat (limited to 'book/src/languages.md')
-rw-r--r--book/src/languages.md24
1 files changed, 13 insertions, 11 deletions
diff --git a/book/src/languages.md b/book/src/languages.md
index 74d090eb..8a8f3bb6 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -5,13 +5,15 @@ in `languages.toml` files.
## `languages.toml` files
-There are three possible `languages.toml` files. The first is compiled into
-Helix and lives in the [Helix repository](https://github.com/helix-editor/helix/blob/master/languages.toml).
-This provides the default configurations for languages and language servers.
+There are three possible locations for a `languages.toml` file:
-You may define a `languages.toml` in your [configuration directory](./configuration.md)
-which overrides values from the built-in language configuration. For example
-to disable auto-LSP-formatting in Rust:
+1. In the Helix source code, this lives in the
+ [Helix repository](https://github.com/helix-editor/helix/blob/master/languages.toml).
+ It provides the default configurations for languages and language servers.
+
+2. In your [configuration directory](./configuration.md). This overrides values
+ from the built-in language configuration. For example to disable
+ auto-LSP-formatting in Rust:
```toml
# in <config_dir>/helix/languages.toml
@@ -21,10 +23,10 @@ name = "rust"
auto-format = false
```
-Language configuration may also be overridden local to a project by creating
-a `languages.toml` file under a `.helix` directory. Its settings will be merged
-with the language configuration in the configuration directory and the built-in
-configuration.
+3. In a `.helix` folder in your project. Language configuration may also be
+ overridden local to a project by creating a `languages.toml` file in a
+ `.helix` folder. Its settings will be merged with the language configuration
+ in the configuration directory and the built-in configuration.
## Language configuration
@@ -65,7 +67,7 @@ These configuration keys are available:
### File-type detection and the `file-types` key
-Helix determines which language configuration to use with the `file-types` key
+Helix determines which language configuration to use based on the `file-types` key
from the above section. `file-types` is a list of strings or tables, for
example: