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
f3509824e8
WIP: Start on SyntaxMapSnapshot::unknown_injection_languages
2023-01-24 12:55:49 +01:00
Antonio Scandurra
14c72cac58
Store syntax layers even if a language for the injection can't be found
2023-01-24 12:25:12 +01:00
Antonio Scandurra
8dabdd1baa
Ensure injection layer is recomputed when language changes
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-01-23 19:02:06 +01:00
Antonio Scandurra
79cf6fb8b6
WIP: Add test for dynamic language injection
2023-01-23 09:45:36 +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
c49dc8d6e5
Rename LanguageRegistry::get_language
to language_for_name
2023-01-23 08:56:41 +01:00
Max Brunsfeld
56080771e6
Add test for avoiding indent adjustment inside newly-created errors
2023-01-20 17:02:38 -08:00
Max Brunsfeld
1851e2e77c
Start work on language config overrides
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 12:32:08 -08:00
Max Brunsfeld
b222e8eb5a
Use a longer example text in random combined injections test
2022-11-14 16:56:21 -08:00
Max Brunsfeld
ee66adbb49
SyntaxMap - Don't ignore deletions at the boundaries of layers
2022-11-11 16:43:57 -08:00
Max Brunsfeld
9ad8731897
Fix boundary condition where injection was not found after an edit
2022-11-10 17:04:40 -08:00
Max Brunsfeld
7dcd6c920f
Add randomized test for syntax map with combined injections
2022-11-08 11:29:23 -08:00
Max Brunsfeld
ea42bc3c9b
Rename some sum_tree seek targets in SyntaxMap
2022-11-08 10:36:44 -08:00
Max Brunsfeld
86f51ade60
Fix panic in handling edits to combined injections
2022-11-07 17:32:15 -08:00
Max Brunsfeld
c838a7d973
Get combined injections basically working
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2022-11-07 16:58:12 -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 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
aa86806408
Finish generalizing ToggleComments to support block comments
2022-10-05 12:25:32 -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 Brunsfeld
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
Mikayla Maki
ebae991cb2
Finished terminal search
2022-09-01 13:45:46 -07:00
Max Brunsfeld
a38c6015db
Fix bugs in SyntaxMap::interpolate found by the randomized test
2022-08-29 16:52:58 -07:00
Max Brunsfeld
1746ec573a
Check invariants after interpolating tree in random syntax map test
2022-08-29 16:16:11 -07:00
Max Brunsfeld
74a2b093ab
Start work on randomized test for SyntaxMap, fix discovered bugs
2022-08-25 17:49:39 -07:00
Max Brunsfeld
1f12186e3c
Update to latest tree-sitter commit
...
This is needed for https://github.com/tree-sitter/tree-sitter/pull/1845
2022-08-25 10:58:46 -07:00
Max Brunsfeld
61b70b7e2d
Fix re-parsing when buffer's language has changed
2022-08-24 15:32:42 -07:00
Max Brunsfeld
587175d0ea
Update syntax map's interpolated version when a parse completes
2022-08-24 15:09:10 -07:00
Max Brunsfeld
ced45cbb0a
Use SyntaxMap in Buffer
2022-08-24 13:00:27 -07:00
Max Brunsfeld
9113c94371
Add SyntaxMap methods for running queries and combining their results
2022-08-23 14:26:09 -07:00
Max Brunsfeld
71e17a54ae
Fix case where layers were processed linearly when reparsing
2022-08-23 09:38:03 -07:00
Max Brunsfeld
ae9e1338f6
Fix more bugs in syntax map interpolation
2022-08-22 17:52:14 -07:00
Max Brunsfeld
58fda5ac1c
Test more editing patterns of SyntaxMap, fix bugs
2022-08-22 15:36:58 -07:00
Max Brunsfeld
e8548e7732
Restructure handling of changed regions when reparsing
2022-08-21 11:39:02 -07:00
Max Brunsfeld
5209e2d68c
Fix off-by-one in handling edits, start on more edit unit tests
2022-08-21 11:37:17 -07:00
Max Brunsfeld
02f8705f2e
Start work on handling edits in the SyntaxMap
2022-08-21 11:37:10 -07:00
Max Brunsfeld
f6a817a0f3
Start work on a SyntaxMap data structure
2022-08-21 11:37:10 -07:00