Commit Graph
30 Commits
Author SHA1 Message Date
Max BrunsfeldandMarshall 6edeea7c8a 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 e9edad1d51 language: Accept multiple values in line_comment language knob. (#6713)
This opens up a possibility of supporting multiple comment continuation
flavours in editor, e.g. doc comments for Rust (which we seize as well
in this commit). Only the first `line_comment` value is used for
Editor::ToggleComments

Fixes: https://github.com/zed-industries/zed/issues/6692

Release Notes:
- Added support for doc-comment continuations in Rust language.
2024-01-25 19:25:21 +01:00
KCaverly 9f160537ef move collapsed only matches outside item parent in embedding.scm 2023-10-03 11:56:45 +03:00
Antonio Scandurra bf5d9e3224 Sort matches before processing them 2023-10-02 17:50:52 +02:00
Antonio Scandurra 64a55681e6 Summarize the contents of a file using the embedding query 2023-10-02 14:32:13 +02:00
Antonio Scandurra 53c25690f9 WIP: Use a different approach to codegen outline 2023-09-29 20:37:07 +02:00
Max Brunsfeld 9e755bb855 Revert "Extract syntax highlighting properties from tree-sitter highlight queries (#2797)"
This reverts commit 45c635872b, reversing
changes made to f2b82369f2.
2023-08-02 12:15:39 -07:00
Nate Butler 86fa27eb54 Update uses of # to . in our scheme files where they are interchangeable.
uses of `#` cause ERRORs in our scheme highlighting
2023-07-27 12:41:19 -04:00
KCaverlyandmaxbrunsfeld 9809ec3d70 update treesitter parsing to accomodate for collapsed nested functions
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-19 15:47:05 -04:00
KCaverlyandmaxbrunsfeld 623cb9833c add tests for rust context parsing, and update rust embedding query
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-13 16:58:42 -04:00
5eab628580 Added go parsing for semantic search, and added preceeding comments on go and rust.
Co-authored-by: Alex <alexviscreanu@gmail.com>
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-13 14:33:31 -04:00
KCaverlyandmaxbrunsfeld 36907bb4dc updated vector store indexing to only use languages with an embedding.scm treesitter query
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-30 16:14:11 -04:00
Max Brunsfeld 8922156923 Restructure how bracket pairs are overridden to unify lists
This way, a bracket pair that is disabled in a given scope can still be skipped, if
it was auto-closed before that scope existed.
2023-02-20 10:53:37 -08:00
Max Brunsfeld 2d39358323 rust: Highlight functions called with a turbofish 2023-02-16 12:11:57 -08:00
Max Brunsfeld 9f74d6e4ac Highlight and auto-indent await expressions in rust 2023-01-20 15:56:56 -08:00
Max BrunsfeldandJulia Risley 8dcef46842 Drop 'override.' prefix from capture names in override query
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:44:33 -08:00
Max BrunsfeldandJulia Risley 2aa7a9e95b Add overrides for all languages
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:39:31 -08:00
Max Brunsfeld 601ec40ddc Bump tree-sitter-rust for let-else, let-chains 2022-11-03 12:35:12 -07:00
Max Brunsfeld 6ecf870c66 Tweak SCREAMING_SNAKE_CASE regexes in highlight queries 2022-10-07 12:46:49 -07:00
Max Brunsfeld 95cb9ceac9 Collapse variant and type into the same color 2022-10-07 12:44:55 -07:00
Max Brunsfeld 070c4bc503 Add color for 'variable.special' and use it in highlight queries 2022-10-07 12:44:20 -07:00
Max Brunsfeld 345b266dee Add missing rust highlights 2022-08-24 16:49:03 -07:00
Max Brunsfeld ced45cbb0a Use SyntaxMap in Buffer 2022-08-24 13:00:27 -07:00
Max Brunsfeld f6a817a0f3 Start work on a SyntaxMap data structure 2022-08-21 11:37:10 -07:00
Antonio Scandurra d425d9fa64 Allow wrapping selected text with ' in Rust 2022-06-20 11:56:46 +02:00
Antonio Scandurra 6040429f93 Auto-close ' for TypeScript and don't do so for Rust 2022-06-20 11:55:40 +02:00
Antonio Scandurra d6c630f8eb Add missing auto-close brackets from various languages 2022-06-20 11:38:12 +02:00
Max BrunsfeldandKeith Simmons f0c6a6ad18 Highlight punctuation uniformly in all supported languages
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-22 12:16:49 -07:00
Max Brunsfeld 3b4cab9094 Move all configuration of individual LSP servers to LspAdapter 2022-03-29 18:14:30 -07:00
Max Brunsfeld d466768eed WIP 2022-03-29 11:06:08 -07:00