summaryrefslogtreecommitdiff
path: root/book/src/languages.md
diff options
context:
space:
mode:
authormidnightexigent2022-10-20 14:13:56 +0000
committerGitHub2022-10-20 14:13:56 +0000
commitd801a6693c3d475b3942f705d3ef48d7966bdf65 (patch)
treebac1900ae07756d79c66bfa6a2c8708f8c3ff2ff /book/src/languages.md
parent78c0cdc519a2c76842441103b1ed716bb7c0a4e1 (diff)
Allow using path suffixes to associate language file-types (#2455)
* feat(syntax): add strategy to associate file to language through pattern File path will match if it ends with any of the file types provided in the config. Also used this feature to add support for the .git/config and .ssh/config files * Add /etc/ssh/ssh_config to languages.toml * cargo xtask docgen * Update languages.md * Update languages.md * Update book/src/languages.md Co-authored-by: Ivan Tham <pickfire@riseup.net> * Update book/src/languages.md Co-authored-by: Ivan Tham <pickfire@riseup.net> Co-authored-by: Ivan Tham <pickfire@riseup.net>
Diffstat (limited to 'book/src/languages.md')
-rw-r--r--book/src/languages.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/book/src/languages.md b/book/src/languages.md
index 73c81213..9b90a211 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -50,7 +50,7 @@ These configuration keys are available:
| `name` | The name of the language |
| `scope` | A string like `source.js` that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually `source.<name>` or `text.<name>` in case of markup languages |
| `injection-regex` | regex pattern that will be tested against a language name in order to determine whether this language should be used for a potential [language injection][treesitter-language-injection] site. |
-| `file-types` | The filetypes of the language, for example `["yml", "yaml"]`. Extensions and full file names are supported. |
+| `file-types` | The filetypes of the language, for example `["yml", "yaml"]`. This attempts to match by exact file name (`.zshrc`), then by file extension (`toml`), then by path suffix (`.git/config`). |
| `shebangs` | The interpreters from the shebang line, for example `["sh", "bash"]` |
| `roots` | A set of marker files to look for when trying to find the workspace root. For example `Cargo.lock`, `yarn.lock` |
| `auto-format` | Whether to autoformat this language when saving |