# Add a setting for custom associations between languages and files \(\#9290\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/724c19a223b17d6cf135c4eb9a89e85d2ab86f37)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 724c19a223b17d6cf135c4eb9a89e85d2ab86f37

Requested commit: 724c19a223b17d6cf135c4eb9a89e85d2ab86f37

Commit: 724c19a223b17d6cf135c4eb9a89e85d2ab86f37

Tree: cb49fe23431687ca086e0fd9856467e9003f83bf

Author: Max Brunsfeld

Committer: GitHub

## Message

````
Add a setting for custom associations between languages and files (#9290)

Closes #5178

Release Notes:

- Added a `file_types` setting that can be used to associate languages
with file names and file extensions. For example, to interpret all `.c`
files as C++, and files called `MyLockFile` as TOML, add the following
to `settings.json`:

    ```json
    {
      "file_types": {
        "C++": ["c"],
        "TOML": ["MyLockFile"]
      }
    }
    ```

As with most zed settings, this can be configured on a per-directory
basis by including a local `.zed/settings.json` file in that directory.

---------

Co-authored-by: Marshall <marshall@zed.dev>
````

## Parents

- [77de5689a3c27b658a410c20af2fbeb93ce8c136](https://git.cafe/gitcafe/zed/commit/77de5689a3c27b658a410c20af2fbeb93ce8c136?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/724c19a223b17d6cf135c4eb9a89e85d2ab86f37?format=markdown)
