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
Max Brunsfeld
528d64d3cc
WIP - Improve project diagnostic context rendering
2021-12-16 18:34:29 -08:00
Antonio Scandurra
1bdaeda43e
Remove disk diagnostics that were invalidated by a buffer edit
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-12-15 18:29:01 +01:00
Nathan Sobo
6c5b27af1d
Group diagnostics by primary
...
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-14 18:26:42 -07:00
Antonio Scandurra
08e9f3e1e3
Maintain a different undo/redo stack in MultiBuffer
...
This only applies to singleton mode.
2021-12-14 17:43:41 +01:00
Max Brunsfeld
4efdc53d9f
WIP
2021-12-13 17:44:20 -08:00
Max Brunsfeld
52b8e3d1a2
Get tests passing after diagnostic + selection changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-13 11:34:56 -08:00
Max Brunsfeld
418a9a3d66
Get things compiling with diagnostics on worktree
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-13 11:15:03 -08:00
Antonio Scandurra
85674ba506
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-13 16:46:35 +01:00
Antonio Scandurra
c984b39aaa
Show remote collaborators' active selections
2021-12-13 11:38:38 +01:00
Nathan Sobo
cdbcbdfe6d
Test undo/redo at editor layer, including selection restoration
2021-12-12 15:04:19 -07:00
Nathan Sobo
1e7184ea07
Get selections rendering again when local selections are owned by Editor
2021-12-11 13:42:46 -07:00
Nathan Sobo
4dd0752e80
More messy progress towards selections in editors
2021-12-11 00:29:34 -07:00
Nathan Sobo
8432daef6a
WIP: Start on removing selections from buffer in favor of editor
2021-12-10 19:23:34 -07:00
Nathan Sobo
f35c419f43
Return optional transaction ids from undo/redo
...
This will allow the editor to restore selections that it associated with the start or end of a transaction.
2021-12-10 18:08:26 -07:00
Nathan Sobo
77defe6e28
Return optional transaction ids when starting/ending a transaction
...
If the transaction was nested, we return None. Otherwise we return the transaction id in preparation for editors to maintain their own selection state.
2021-12-10 18:00:09 -07:00
Nathan Sobo
c8b43e3078
Move multi_buffer to editor crate
2021-12-10 17:37:53 -07:00
Max Brunsfeld
6caf016df9
Get tests passing w/ multibuffer in editor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 15:54:25 -08:00
Max Brunsfeld
75dd37d873
Update multibuffer when buffers' syntax trees or diagnostics change
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 15:54:06 -08:00
Max Brunsfeld
ceff57d02f
Don't append a trailing newline in singleton MultiBuffer
2021-12-10 14:27:58 -08:00
Max Brunsfeld
a758bd4f8d
Fill in some missing methods on MultiBuffer, MultiBufferSnapshot
2021-12-10 14:27:04 -08:00
Antonio Scandurra
5b31c1ba4e
Start making MultiBuffer
work with a singleton buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 18:04:11 +01:00
Antonio Scandurra
7524974f19
Get everything compiling again
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 17:15:16 +01:00
Antonio Scandurra
da09247e5e
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 16:14:12 +01:00
Antonio Scandurra
9c74deb9ec
Finish removing anchor collections from MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 15:58:37 +01:00
Antonio Scandurra
c8d5e19492
Merge branch 'fragment-locators' into project-diagnostics
2021-12-10 14:01:17 +01:00
Antonio Scandurra
cb97b7cd1d
Fix diagnostic unit test
2021-12-10 09:43:21 +01:00
Max Brunsfeld
5e516f59c0
Merge branch 'fragment-locators' into HEAD
2021-12-09 14:49:04 -08:00
Antonio Scandurra
91a7bbbba2
Fix some of the diagnostic tests and make DiagnosticEntry generic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-09 17:53:08 +01:00
Antonio Scandurra
65711b2256
Remove anchor collections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-09 17:28:27 +01:00
Nathan Sobo
98f726974e
WIP
2021-12-08 20:04:30 -07:00
Nathan Sobo
4ee404a0af
Take a cx in MultiBuffer::start_transaction
2021-12-08 19:30:52 -07:00