Commit Graph
139 Commits
Author SHA1 Message Date
Max Brunsfeld ddf4e1a316 Load languages lazily in the background 2023-01-25 17:47:46 -08:00
Antonio Scandurra c48e3f3d05 Reparse unknown injection ranges in buffer when adding a new language 2023-01-24 15:29:59 +01:00
Antonio Scandurra cb610f37f2 WIP: Search language injections also by file extension
There are still a few things left:

1. Add test to verify we can successfully locate a language by its extension
2. Add test to reproduce bug where changing the fenced code block language
   won't reparse the block with the new language
3. Reparse injections for which we couldn't find a language when the language
   registry changes.
4. Check why the markdown grammar considers the trailing triple backtick as
   `(code_block_content)`, as opposed to being part of the outer markdown.
2023-01-23 08:56:41 +01:00
Antonio Scandurra 36e4dcef16 Avoid allocating a string to compare language names 2023-01-23 08:56:41 +01:00
Antonio Scandurra c49dc8d6e5 Rename LanguageRegistry::get_language to language_for_name 2023-01-23 08:56:41 +01:00
Max Brunsfeld f7ceebfce3 Avoid adjusting indentation of lines inside newly-created errors 2023-01-20 15:56:45 -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 BrunsfeldandJulia Risley 2967b46a17 Implement scope-specific bracket matching and comment toggling
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 15:04:27 -08:00
Max BrunsfeldandJulia Risley 1851e2e77c Start work on language config overrides
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 12:32:08 -08:00
JuliaandMax Brunsfeld 1c84e77c37 Start adding concept of Unclipped text coordinates
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-21 15:48:25 -05:00
Max Brunsfeld bca635e5d3 Add LspAdapter hook for processing completions, fix completion sorting from Pyright 2022-11-17 15:26:46 -08:00
Max Brunsfeld 5efe2ed6d3 Start work on handling combined injections in SyntaxMap 2022-11-07 14:45:17 -08:00
Max Brunsfeld be6ee3cbff Start work on ERB language support 2022-11-04 09:33:59 -07:00
Max BrunsfeldandKay Simmons d222904471 Add basic support for ruby
Co-authored-by: Kay Simmons <kay@zed.dev>
2022-11-03 15:52:33 -07:00
Max Brunsfeld 6cdf4e98fc Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Mikayla Maki 0beb97547e Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
Max Brunsfeld 63e1c839fe Rename language::tests -> language::buffer_tests 2022-10-06 13:32:49 -07:00
Max Brunsfeld d9fb8c90d8 Start work on toggling block comments for HTML 2022-10-04 17:27:03 -07:00
Max Brunsfeld c354b9b959 Add assertions to test for autoclose with embedded languages 2022-10-03 13:24:37 -07:00
Max Brunsfeld 4f44375abd Make Buffer::language_at fall back to Buffer::language
For languages with no grammar (plain text), there
will be no layers.
2022-09-28 13:38:54 -07:00
Max BrunsfeldandJulia Risley 67e188a015 Add Buffer::language_at, update MultiBuffer to use it
Co-authored-by: Julia Risley <floc@unpromptedtirade.com>
2022-09-28 12:32:04 -07:00
Max Brunsfeld 21fb2b9bf1 Tweak HTML indents and highlights 2022-09-28 12:32:04 -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
ForLoveOfCatsandMikayla 8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld 2a478462b6 Fix association of 'json' lsp language id with JSON language 2022-07-12 15:43:59 -07:00
Isaac Clayton d8b22a200e Rename LspAdapterTrait to LspAdapter and LspAdapter to CachedLspAdapter 2022-07-12 09:29:38 +02:00
Isaac Clayton ec327a30c3 Fix minor issues pointed out in the review 2022-07-11 15:54:03 +02:00
Isaac Clayton 3ad8d5363c Remove the blocking call and inline on_lsp_diagnostics_published 2022-07-11 12:11:00 +02:00
Isaac Clayton 8931218dc6 Remove debug statements 2022-07-08 21:28:35 +02:00
Isaac Clayton 3e8b230567 Highlight languages as languages load 2022-07-08 21:19:07 +02:00
Isaac Clayton 988f388165 Added theme to language 2022-07-08 18:11:28 +02:00
Isaac Clayton 6f99d59d38 Require theme directly when creating language 2022-07-08 16:08:40 +02:00
Isaac Clayton 73620dad06 Add channel to notify project when languages are added 2022-07-08 14:37:27 +02:00
Isaac Clayton 5cb59dfdab Fix errors resulting from rebase 2022-07-07 18:14:16 +02:00
Isaac Clayton 895747476f Done! Finish transition to async, very close to merging 2022-07-07 16:21:20 +02:00
Isaac Clayton d009e10a46 Fix all residual errors, need to polish off warnings and TODOS 2022-07-07 16:17:03 +02:00
Isaac Clayton 4f016d5fc4 Switch LspAdapter to struct and revert some async/await 2022-07-07 16:12:10 +02:00
Isaac Clayton 602fe14aa4 Going to move LspAdapter from trait to struct 2022-07-07 15:44:21 +02:00
Isaac Clayton 2c637b83bf Work on updating code to be async 2022-07-07 15:32:41 +02:00
Isaac Clayton 841a9bd2a7 Make into async trait, will refactor everything Monday 2022-07-07 15:25:49 +02:00
Isaac Clayton 71e0555763 Add JSON LSP plugin 2022-07-07 15:22:16 +02:00
Isaac Clayton 7dd3114a7a Start switching JSON LSP adapter to plugin (take 2) 2022-07-07 15:16:59 +02:00
Max Brunsfeld 929615964d Add new indentation features to support Python 2022-06-27 22:34:14 -07:00
Max BrunsfeldandAntonio Scandurra e9d19457d6 Add failing test for replication of lsp statuses
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:27:08 -07:00
Max Brunsfeld 216a275ef2 Disable auto-indent entirely for markdown 2022-06-16 14:20:09 -07:00
Antonio Scandurra 4e4210ac39 Open a buffer for every language server error when clicking on status 2022-06-16 10:00:29 +02:00
Keith Simmons dddfc7beae Add hover test and tweak dismiss logic 2022-06-09 17:03:45 -07:00
Max Brunsfeld 87ba68e3ea Merge pull request #1155 from zed-industries/golang
Add Go support
2022-06-09 14:18:37 -07:00