Antonio Scandurra and Nathan Sobo
b6685a532c
Make "go to definition" work in project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-20 17:30:30 +01:00
Antonio Scandurra and Nathan Sobo
d92b40474f
Change GoToDefinition binding to F12
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-20 15:43:02 +01:00
Antonio Scandurra
66734e11af
WIP: Start on a GoToDefinition action for the editor
2022-01-20 12:26:04 +01:00
Max Brunsfeld
f43dcd6763
Move logic for starting language servers to the project
2022-01-19 14:05:06 -08:00
Antonio Scandurra
18f1040c85
Rename Navigation to NavHistory
2022-01-19 15:27:34 +01:00
Max Brunsfeld
05bf8f61e2
Avoid changing selection in buffer navigation dialogs
...
If an editor has highlighted_rows, autoscroll it to reveal those rows instead of
its cursor positions.
2022-01-18 17:29:33 -08:00
Max Brunsfeld
926306582b
Add a unit test for navigation behavior at the editor level
2022-01-18 16:25:22 -08:00
Max Brunsfeld
f7326b8d74
Push to navigation history based on jump distance instead of time
2022-01-18 15:02:49 -08:00
Antonio Scandurra
16b82d59f1
Experiment with a more general way of pushing editor navigation entries
2022-01-18 18:03:10 +01:00
Antonio Scandurra
bb954e29cf
Introduce a test to verify navigation
2022-01-18 10:03:56 +01:00
Antonio Scandurra
d5acbe1e32
Use offset to restore navigation position if anchor can't be resolved
2022-01-18 09:59:28 +01:00
Max Brunsfeld
11b7270f68
Navigate to previous positions in editors when using navigation history
2022-01-17 16:01:52 -08:00
Antonio Scandurra
bbf634f439
Start laying the foundation for a per-pane navigation system
2022-01-17 16:59:06 +01:00
b7561c6cef
Add select_first and select_last bindings to outline view
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-14 10:45:37 -08:00
Max Brunsfeld and Antonio Scandurra
373fe6fadf
Change Editor::set_highlighted_row to take a row range
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-13 09:49:46 -08:00
Antonio Scandurra and Max Brunsfeld
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
Max Brunsfeld
9ccf2f3f58
Tweak theming of project diagnostics
2022-01-12 10:51:08 -08:00
Max Brunsfeld
b5ee095da9
Deduplicate path names in the project diagnostics view
2022-01-12 10:51:08 -08:00
Antonio Scandurra
6fbbbab7ba
Process selection anchors in a sorted fashion when refreshing them
2022-01-12 09:28:09 +01:00
Antonio Scandurra
b768a3977c
Add unit test reproducing a panic when refreshing selections
2022-01-12 09:27:03 +01:00
Antonio Scandurra
7daa4b5b04
Don't return a Result in test-only method select_display_ranges
2022-01-12 09:14:48 +01:00
c16820166b
Fix cursor position when inserting newlines on a repeated excerpt
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-11 18:30:25 +01:00
Antonio Scandurra and Nathan Sobo
aa543a4b0a
Ensure selections stay sorted after refreshing them
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-11 17:16:45 +01:00
Antonio Scandurra
b1de9a945d
Fix outdent not working when cursor is at column 0
2022-01-10 15:32:28 +01:00
Max Brunsfeld
f933d54469
When selections lose their excerpts, move them to the next primary diagnostic
2022-01-07 14:53:33 -08:00
Antonio Scandurra and Nathan Sobo
e5c520a265
Use Buffer handles instead of MultiBuffer as editor workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:48:31 +01:00
Antonio Scandurra and Nathan Sobo
794d214eee
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:38:37 +01:00
Antonio Scandurra and Nathan Sobo
3cab32d201
WIP: Add keybinding to open buffers under cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 16:12:50 +01:00
Max Brunsfeld
94e9c7fd5b
Give a full-width background to the diagnostic headers
2022-01-06 17:55:56 -08:00
Max Brunsfeld and Nathan Sobo
b19d92e918
Keep selections at the top of the project diagnostics view when it is first populated
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 17:01:13 -08:00
Antonio Scandurra and Nathan Sobo
1875a0e349
Polish rendering of inline errors
...
- Don't soft-wrap
- Render multiple lines
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 16:17:53 +01:00
Antonio Scandurra
f37f839330
Wire up refresh_anchors in Editor::refresh_selections and call it
2022-01-06 15:32:37 +01:00
Max Brunsfeld
7340e83059
WIP - MultiBuffer::refresh_anchors
2022-01-05 21:12:49 -08:00
Max Brunsfeld and Nathan Sobo
5a53eeef63
Don't scroll editors away from the top of their buffer when content changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 12:31:00 -08:00
Antonio Scandurra
29b63ae4c6
Remove invalid excerpts as opposed to styling them differently
2022-01-05 18:21:17 +01:00
Antonio Scandurra
508b9dc024
Rip out "diagnostic providers"
2022-01-04 16:32:17 +01:00
Antonio Scandurra
ed361f2d1a
Position selections correctly when duplicating lines in a multi-buffer
2022-01-04 15:17:37 +01:00
Antonio Scandurra
8dc9197324
Position cursors correctly in Editor::delete_line in a multi-buffer
2022-01-04 15:17:37 +01:00
Nathan Sobo
6d6a82655a
Create blocks with anchors to allow a bias to be specified
...
This allows us to respect the bias on anchors we use to create excerpt headers so that they always remain above any content inserted at the start of an excerpt.
2021-12-30 01:03:19 -08:00
Nathan Sobo
984378e12c
Use anchors for line movement edits to support multi-buffers
...
Because multi-buffers can contain the same content multiple times, we need to use anchors to track our desired insertion and removal locations when moving lines. This is because deleting a line in order to move it might end up deleting *multiple* lines.
2021-12-29 23:47:03 -08:00
Max Brunsfeld
137fbd0088
Update editor element to use new {next,prev}_line_boundary methods
...
Since these methods take buffer points instead of display points, this adjusts
the logic for retrieving the visible selections, so that they are initially returned
in terms of buffer points.
2021-12-28 13:47:09 -08:00
Nathan Sobo
7f786ca8a6
WIP: Start moving toward a simpler interface for detecting prev/next line boundaries
2021-12-27 22:11:05 -08:00
Nathan Sobo
89bbfb8154
wip
2021-12-27 21:14:23 -08:00
Max Brunsfeld
6057d819b0
Add a unit test showing panic in move_line_down
2021-12-27 20:58:01 -08:00
Max Brunsfeld and Nathan Sobo
accf90e843
Add MultiBufferSnapshot::range_contains_excerpt_boundary
...
Use this method to disable move_line_down across excerpt boundaries.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-27 17:08:31 -08:00
Nathan Sobo
cbc162acf5
WIP: Allow lines to be moved down across excerpts
...
This is still a bit weird because we can't remove the last line of an excerpt but we still move it into another buffer. There also seem to be issues with undo.
2021-12-27 15:46:19 -08:00
Max Brunsfeld and Nathan Sobo
3040cfece1
Fix Editor::newest_selection
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-27 15:42:37 -08:00
Max Brunsfeld and Nathan Sobo
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
Nathan Sobo and Aaron Hillegass
e9a750be71
Don't merge keymap contexts from containing elements
...
Co-Authored-By: Aaron Hillegass <charmedliferaft@gmail.com >
2021-12-24 16:44:35 -07:00
Antonio Scandurra
393009a05c
Implement Buffer::diagnostic_group
2021-12-24 12:08:55 +01:00