Nathan Sobo
9505d6cdcf
Disable the nav history when selecting a definition in a different buffer
...
When jumping between different buffers, we don't care about the cursor's previous location. When navigating backward, we want to jump directly to the site of the jump.
2022-01-20 21:33:16 -07:00
Nathan Sobo
1c21b51663
Merge pull request #355 from zed-industries/activate-existing-windows
...
Move window to the foreground when opening a path in an existing workspace
2022-01-20 21:14:56 -07:00
Nathan Sobo
fbca28337a
When opening a path in an existing window, move it to the foreground
2022-01-20 20:45:30 -07:00
Antonio Scandurra
377e41a90f
Make navigation history work with project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-20 18:21:48 +01:00
Antonio Scandurra
c450945001
WIP
2022-01-20 18:11:37 +01:00
Antonio Scandurra
fad5c98b8d
Center selections when going to definition
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-20 17:33:07 +01:00
Antonio Scandurra
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
d92b40474f
Change GoToDefinition
binding to F12
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-20 15:43:02 +01:00
Antonio Scandurra
a53c87edfe
🎨
2022-01-20 15:26:10 +01:00
Antonio Scandurra
66734e11af
WIP: Start on a GoToDefinition
action for the editor
2022-01-20 12:26:04 +01:00
Antonio Scandurra
cbbf7391e8
Start on Project::definition
that only works locally (for now)
2022-01-20 12:11:41 +01:00
Antonio Scandurra
11a83d01c2
Advertise link capability in LSP
2022-01-20 12:10:01 +01:00
Antonio Scandurra
6b1f989c2b
Omit worktree id when emitting Event::DiskBasedDiagnosticsUpdated
...
Sometimes we will have more than one worktree associated with the same
language server and in that case it's unclear which worktree id we should
report an event for.
2022-01-20 10:13:27 +01:00
Antonio Scandurra
71082d4cdc
Return a Task<Result<()>>
in {ItemView,Buffer,MultiBuffer}::save
2022-01-20 09:58:24 +01:00
Antonio Scandurra
634340dd84
Return a task from Workspace::save_active_item
...
This required changing our approach to OS prompts and this commit greatly
simplifies that. We now avoid passing a callback and return a simple future
instead. This lets callers spawn tasks to handle those futures.
2022-01-20 09:51:29 +01:00
Max Brunsfeld
e56c043693
Get tests passing, centralize more diagnostic logic in Project
2022-01-19 16:32:55 -08:00
Max Brunsfeld
0992132a0d
Always open buffers via the project
2022-01-19 14:48:54 -08:00
Max Brunsfeld
f43dcd6763
Move logic for starting language servers to the project
2022-01-19 14:05:06 -08:00
Antonio Scandurra
10c64f527c
WIP
2022-01-19 19:28:41 +01:00
Antonio Scandurra
8052f905e5
Remove unused languages
field from LocalWorktree
2022-01-19 18:46:17 +01:00
Antonio Scandurra
ae284c2d8a
Route save_as
via the Project
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-19 18:44:48 +01:00
Antonio Scandurra
e7235a82ec
Remove unused languages
field on LocalWorktree
2022-01-19 17:27:00 +01:00
Antonio Scandurra
9c9a09cccb
Replace project_path
with project_entry
in workspace::{Item, ItemView}
2022-01-19 15:56:04 +01:00
Antonio Scandurra
18f1040c85
Rename Navigation
to NavHistory
2022-01-19 15:27:34 +01:00
Antonio Scandurra
7c233ed682
Merge pull request #349 from zed-industries/navigation-history
...
Add a navigation history
2022-01-19 09:02:23 +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
2cae706033
Limit the storage used by the navigation history
2022-01-18 16:31:48 -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
0cae3e0ac0
Ensure focus is transferred when opening the first item in pane
2022-01-18 10:15:37 +01:00
Antonio Scandurra
b7091dd5e2
Fix double borrow error when closing an item
2022-01-18 10:13:50 +01:00
Antonio Scandurra
4f472e1442
🔥
2022-01-18 10:10:16 +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
Antonio Scandurra
d480738cc5
Skip past entries in the navigation history that can't be re-opened
2022-01-18 09:58:40 +01:00
Max Brunsfeld
11b7270f68
Navigate to previous positions in editors when using navigation history
2022-01-17 16:01:52 -08:00
Max Brunsfeld
e43d33cdad
WIP - Reopen closed items when going back in nav history
2022-01-17 10:46:47 -08:00
Antonio Scandurra
ea624c6cde
Populate backward/forward stacks upon item deactivation
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-17 18:57:31 +01:00
Antonio Scandurra
bbf634f439
Start laying the foundation for a per-pane navigation system
2022-01-17 16:59:06 +01:00
Antonio Scandurra
cd0d1d3340
Delete unused pane::State
struct
2022-01-17 15:27:54 +01:00
Antonio Scandurra
c3b1530ce2
Remove accidentally committed test.md
file
2022-01-17 11:12:54 +01:00
Antonio Scandurra
71f3ed4162
Merge pull request #347 from zed-industries/fix-sharing-after-unsharing
...
Cleanup worktrees' shared state when unsharing
2022-01-17 11:11:23 +01:00
Antonio Scandurra
f51cf6b05e
Cleanup worktrees' shared state when unsharing
2022-01-17 10:58:49 +01:00
Antonio Scandurra
5415663a73
Merge pull request #346 from zed-industries/missing-notify
...
Always re-render outline view when changing the active selection
2022-01-17 10:30:11 +01:00
Antonio Scandurra
466b26e7e6
Always re-render outline view when changing the active selection
2022-01-17 10:17:11 +01:00
Max Brunsfeld
e27fafb824
v0.12
2022-01-14 12:03:29 -08:00
Max Brunsfeld
485554cd0c
Merge pull request #342 from zed-industries/symbolic-nav
...
Introduce outline view
2022-01-14 12:02:43 -08:00
Max Brunsfeld
f3239fe1d5
Apply scroll_max after uniform list autoscrolls
2022-01-14 11:56:28 -08:00
Max Brunsfeld
dd8e5ee543
Add bottom margin to the outline view
2022-01-14 11:01:20 -08:00