Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
docs: More language extension config.toml key documentation (#20818)
Peter Tripp5fd7afb9da3f
diff --git a/docs/src/extensions/languages.md b/docs/src/extensions/languages.mdindex b7e0cb44823..e4fc1aca2b2 100644--- a/docs/src/extensions/languages.md+++ b/docs/src/extensions/languages.md@@ -20,22 +20,22 @@ path_suffixes = ["myl"]line_comments = ["# "]```-- `name` is the human readable name that will show up in the Select Language dropdown.-- `grammar` is the name of a grammar. Grammars are registered separately, described below.-- `path_suffixes` (optional) is an array of file suffixes that should be associated with this language. This supports glob patterns like `config/**/*.toml` where `**` matches 0 or more directories and `*` matches 0 or more characters.-- `line_comments` (optional) is an array of strings that are used to identify line comments in the language.+- `name` (required) is the human readable name that will show up in the Select Language dropdown.+- `grammar` (required) is the name of a grammar. Grammars are registered separately, described below.+- `path_suffixes` is an array of file suffixes that should be associated with this language. Unlike `file_types` in settings, this does not support glob patterns.+- `line_comments` is an array of strings that are used to identify line comments in the language. This is used for the `editor::ToggleComments` keybind: `{#kb editor::ToggleComments}` for toggling lines of code.+- `tab_size` defines the indentation/tab size used for this language (default is `4`).+- `hard_tabs` whether to indent with tabs (`true`) or spaces (`false`, the default).+- `first_line_pattern` is a regular expression, that in addition to `path_suffixes` (above) or `file_types` in settings can be used to match files which should use this language. For example Zed uses this to identify Shell Scripts by matching the [shebangs lines](https://github.com/zed-industries/zed/blob/main/crates/languages/src/bash/config.toml) in the first line of a script.<!--TBD: Document `language_name/config.toml` keys-- line_comments, block_comment- autoclose_before- brackets (start, end, close, newline, not_in: ["comment", "string"])-- tab_size, hard_tabs- word_characters- prettier_parser_name- opt_into_language_servers-- first_line_pattern- code_fence_block_name- scope_opt_in_language_servers- increase_indent_pattern, decrease_indent_pattern