Commit Graph
11 Commits
Author SHA1 Message Date
Max BrunsfeldandMarshall b43d623c67 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>
2024-03-13 10:23:30 -07:00
Max BrunsfeldandMarshall e1ea950492 Add logic for managing language and theme extensions (#7467)
This PR adds the initial support for loading extensions in Zed.

### Extensions Directory

Extensions are loaded from the extensions directory.

The extensions directory has the following structure:

```
extensions/
  installed/
    extension-a/
      grammars/
      languages/
    extension-b/
      themes/
  manifest.json
```

The `manifest.json` file is used internally by Zed to keep track of
which extensions are installed. This file should be maintained
automatically, and shouldn't require any direct interaction with it.

Extensions can provide Tree-sitter grammars, languages, and themes.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-07 15:14:50 -05:00
Piotr Osiewicz 204fbd7a79 text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
Kirill Bulatov 1885228457 Remove dbg! usage from tests 2024-01-09 10:08:27 +02:00
Max Brunsfeld 4dbfdfdf02 Upgrade Tree-sitter for stack-overflow bugfix 2023-11-27 13:16:50 -08:00
Max Brunsfeld 0596c2f103 Format let-else statements 2023-08-25 10:11:32 -07:00
Max Brunsfeld 81c1889026 Add randomized syntax map test with elixir within heex within elixir 2023-07-14 09:58:34 -07:00
Max Brunsfeld 14a6e54cfb Include newlines in between combined injection ranges on different lines 2023-07-14 09:25:56 -07:00
Max Brunsfeld 995045efa7 Fix bugs in handling combined injections exposed by HEEx 2023-06-27 15:08:26 -07:00
Max Brunsfeld 9823a67a47 Fix syntax map bug with combined injections inside of other injections 2023-06-12 17:32:20 -07:00
Max Brunsfeld 9a72f66b72 Move SyntaxMap tests to their own file 2023-06-12 16:24:17 -07:00