Max Brunsfeld
adeb7e6864
Incorporate syntax highlighting into symbol outline view
...
Still need to figure out how to style the fuzzy match characters
now that there's syntax highlighting. Right now, they are
underlined in red.
2022-01-13 18:10:02 -08:00
Max Brunsfeld
7913a1ea22
Include highlighting runs in Outline
2022-01-13 14:46:15 -08:00
Max Brunsfeld
3e1c559b2d
Allow multiple disjoint nodes to be captured as matcheable in the outline query
2022-01-13 14:04:25 -08:00
Antonio Scandurra
055d48cfb2
Select the closest outline item when the outline view's query is empty
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-13 18:43:49 +01:00
Antonio Scandurra
2660d37ad8
Return Outline<Anchor>
from MultiBuffer::outline
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-13 18:24:00 +01:00
Antonio Scandurra
e165f1e16c
Use OutlineItem::depth
to include ancestors of matching candidates
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-13 16:59:52 +01:00
Antonio Scandurra
06ba1c64cf
Implement Outline::search
2022-01-13 15:10:29 +01:00
Antonio Scandurra
d6ed2ba642
Start on rendering the outline view
2022-01-13 12:01:11 +01:00
Antonio Scandurra
ef596c64f8
Add OutlineItem::depth so that we can render a tree in the outline view
2022-01-13 11:35:43 +01:00
Max Brunsfeld
63a401ac5d
Add Buffer::outline method
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:17:49 -08:00
Antonio Scandurra
66694b4c9a
Fix failing tests
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-12 18:43:23 +01:00
Antonio Scandurra
310def2923
Implement Buffer::format
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:01:20 +01:00
Nathan Sobo
d7a78e14ac
Allow disk-based diagnostic progress begin/end events to interleave
...
When multiple saves occur, we can have multiple start events followed by multiple end events. We don't want to update our project diagnostics view until all pending progress is finished.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-06 09:32:08 -07:00
Max Brunsfeld
fee7657fd7
Merge branch 'main' into polish-project-diagnostics
2022-01-05 20:38:20 -08:00
Max Brunsfeld
f9f75e98f8
Fix Locator::from_index
...
Enhance language::tests::test_random_collaborators so that it checks buffer invariants.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-05 17:58:24 -08:00
Max Brunsfeld
e5faaeb2f2
Fix Global::gt
and rename it to changed_since
...
A false negative return value of `gt` was preventing guests' multibuffers from
syncing correctly.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-05 17:36:12 -08:00
Max Brunsfeld
8728d3292d
Merge branch 'main' into polish-project-diagnostics
...
Also fix false failure in ModelHandle::condition when parking is not forbidden.
2022-01-05 10:53:18 -08:00
Antonio Scandurra
e56609cf0c
Ensure prior, deferred selections don't override newer selections
2022-01-05 15:43:26 +01:00
Antonio Scandurra
f8c2620166
Fix Buffer::remote_selections_in_range
at query range boundaries
2022-01-05 15:04:50 +01:00
Antonio Scandurra
587a908225
Populate deferred operations when an operation can't be applied
2022-01-05 15:04:19 +01:00
Antonio Scandurra
bf044506ed
Verify that selections are replicated correctly in randomized test
2022-01-05 15:04:08 +01:00
Antonio Scandurra
870fa5f278
Serialize deferred operations
2022-01-05 11:52:41 +01:00
Antonio Scandurra
d383ff30ce
Introduce randomized test for collaboration on buffers
...
This test will exercise serialization of operations as well as peers
replicating from an existing buffer.
2022-01-05 11:51:41 +01:00
Antonio Scandurra
7bc8eb4f3d
Fix compile errors and get serialization unit test passing
2022-01-05 10:29:29 +01:00
Max Brunsfeld
984e366c32
WIP - Serialize buffer in terms of its state, not its base text + ops
...
The main reason for this is that we need to include information about
a buffer's UndoMap into its protobuf representation. But it's a bit
complex to correctly incorporate this information into the current
protobuf representation.
If we want to continue reusing `Buffer::apply_remote_edit` for
incorporating the historical operations, we need to either make
that method capable of incorporating already-undone edits, or
serialize the UndoMap into undo *operations*, so that we can apply
these undo operations after the fact when deserializing. But this is
not trivial, because an UndoOperation requires information about
the full offset ranges that were undone.
2022-01-04 18:06:16 -08:00
Max Brunsfeld
d7ecbdcc1d
Add unit test showing problem with serialization of undo ops
2022-01-04 16:01:12 -08:00
Antonio Scandurra
b2f0c78924
Merge branch 'main' into polish-project-diagnostics
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-04 18:35:28 +01:00
Antonio Scandurra
ad1db117e6
Re-enable cargo check for rust-analyzer
2022-01-04 18:26:16 +01:00
Antonio Scandurra
508b9dc024
Rip out "diagnostic providers"
2022-01-04 16:32:17 +01:00
Antonio Scandurra
05a6137549
Capture a new buffer snapshot for excerpts whose selections got updated
2022-01-04 12:22:51 +01:00
Max Brunsfeld
7f8e76e0f1
Remove worktree-specific methods from language::File trait
...
Use downcasting instead for accessing worktree-specific state of the Files.
This will allow us to introduce a WorktreeId type and use that everywhere
for identifying worktrees. It also just removes some unnecessary coupling
between the language crate and the worktree.
2022-01-04 11:28:44 +01:00
Max Brunsfeld
cbd9e186b5
Store selections with a right start bias so that autoindent moves them
...
Previously, cursors at column 0 had to be explicitly moved when those lines
were autoindented. This behavior was lost when we moved selections from
the buffer to the editor. Now, with the right bias, we get this behavior automatically.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 15:33:57 -08:00
Max Brunsfeld
43db9e826b
Clear autoindent requests when applying autoindent
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-27 13:33:48 -08:00
Nathan Sobo
cf81f5a555
Update tests to reflect that we no longer attempt to recycle group ids
2021-12-24 16:36:21 -07:00
Antonio Scandurra
a85e400b35
Start on a DiagnosticProvider
implementation for Rust
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-24 16:22:22 +01:00
Antonio Scandurra
393009a05c
Implement Buffer::diagnostic_group
2021-12-24 12:08:55 +01:00
Antonio Scandurra
11e3874b4a
Remove duplication when assigning diagnostics and hardcode provider names
2021-12-24 12:07:26 +01:00
Max Brunsfeld
4f774e2bde
wip
2021-12-23 23:10:28 -08:00
Max Brunsfeld
d5a17053df
Get code compiling with some todos
2021-12-23 14:21:10 -08:00
Nathan Sobo
e3ecd87081
WIP
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-23 11:24:35 -07:00
Antonio Scandurra
7b453beebc
WIP: Use cargo check
for on-disk diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-12-23 18:35:50 +01:00
Antonio Scandurra
b9d1ca4341
Show only disk-based diagnostics in ProjectDiagnosticsEditor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-23 16:47:54 +01:00
Antonio Scandurra
dcf26acaac
Use a different invalidation strategy for project-wide diagnostics
2021-12-23 15:41:43 +01:00
Antonio Scandurra
9164c5f239
Emit an UpdateDiagnostics
from Worktree when buffer diagnostics change
2021-12-23 09:57:50 +01:00
Max Brunsfeld
5d8ed535be
Clear out old disk-based diagnostics after 2 seconds
2021-12-22 15:51:51 -08:00
Max Brunsfeld
b9551ae8b1
Preserve group ids when updating diagnostics
2021-12-22 14:50:51 -08:00
Max Brunsfeld
0faf5308ac
Add a unit test for preserving disk-based diagnostics
2021-12-22 13:27:43 -08:00
Max Brunsfeld
1544da887e
Start work on preserving continuity of disk-based diagnostics
2021-12-22 12:52:50 -08:00
Max Brunsfeld
3c26f67ea3
Minor cleanup in Buffer::update_diagnostics
2021-12-21 14:07:50 -08:00
Max Brunsfeld
04d577e326
Fix context line handline in project diagnostic view
2021-12-21 11:46:47 -08:00