Antonio Scandurra
f4520d4184
WIP
2022-03-18 18:07:03 +01:00
Antonio Scandurra
7d7e10598a
Broadcast active view to followers
2022-03-18 16:00:03 +01:00
Antonio Scandurra
10e6d82c3e
WIP: Start on sending view updates to followers
2022-03-18 14:20:09 +01:00
Antonio Scandurra
f0b7bd6e17
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00
Max Brunsfeld
0fdaa1d715
WIP
2022-03-17 17:53:49 -07:00
Max Brunsfeld and Antonio Scandurra
845457e2c4
Always read project entry id from workspace::Item
...
We cannot store a workspace item's project entry id separately,
since buffers' entry ids can change (for example when doing
a *save as*).
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-17 10:58:20 -07:00
Antonio Scandurra and Nathan Sobo
bff414cfbc
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 15:13:47 +01:00
Antonio Scandurra and Nathan Sobo
44d997c00c
Rename app_state to global in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 14:33:01 +01:00
Antonio Scandurra
a691c2fbdb
Delete unused code
2022-03-17 11:33:58 +01:00
Antonio Scandurra
0efce8f70a
Rename ItemView to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
aced1e2315
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo and Max Brunsfeld
728c708150
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-03-16 17:40:09 -06:00
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Keith Simmons <keith@the-simmons.net >
2022-03-16 15:59:47 -06:00
a88320dc5f
Remove workspace::Item trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Keith Simmons <keith@zed.dev >
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2022-03-16 13:34:06 -07:00
Antonio Scandurra and Nathan Sobo
021699e51c
Implement shift-f8 to go to previous diagnostic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-15 15:13:23 +01:00
Max Brunsfeld
48848de82c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Nathan Sobo
7ef98fb935
Make versions oldest_selection and newest_selection that don't require snapshots
...
I thought I needed this but actually didn't, but I still kinda think it's a good change for the public interface of Editor.
2022-02-27 13:02:09 -07:00
Antonio Scandurra and Max Brunsfeld
e278c423d3
Don't assume that cloning on split will reuse the same underlying model
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-25 18:30:04 +01:00
Antonio Scandurra
b506db7c93
Use the new split pane's navigation history when cloning an item
2022-02-25 17:22:30 +01:00
Max Brunsfeld and Nathan Sobo
47b654063e
Provide editor styling information separately from editor settings
...
* Since regular editors' font sizes and families are controlled by
the settings and not the theme, don't store a dummy text style in
the theme. Instead, only store a font color, and synthesize
the text style for regular editors using both the theme and the
settings.
* Style single-line and auto-height editors (now called "field
editors") using a single function that takes the entire theme and
selects a relevant sub-object.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-24 16:42:00 -08:00
Antonio Scandurra and Nathan Sobo
aee479d615
Show message indicating when we're downloading language servers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-21 17:25:52 +01:00
Antonio Scandurra
8d3b7e996f
Proceed with saving a buffer even if formatting fails
2022-02-12 13:02:19 +01:00
Max Brunsfeld
d4b9d9e820
Inline MultiBuffer::format
...
Put all the logic in Editor. Add an `all_buffers` method so the editor can
format all of the buffers by itself.
2022-02-11 16:22:19 -08:00
Antonio Scandurra
3fc3e51a44
Fix panic when trying to render a diagnostic that has no message
2022-02-11 12:16:20 +01:00
Antonio Scandurra
4929b8c525
Move Buffer::format to Project::format
2022-02-11 12:07:46 +01:00
5049c1b286
Make Editor::newest_anchor_selection return a non-optional value
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-02-10 10:16:54 -07:00
Antonio Scandurra
dd223f93ec
Allow editor to be saved when in multi-buffer mode
...
Also, this commit enables the customization of the title in a multi-buffer.
When specified, it will take precedence over a filename (or "untitled").
2022-02-10 09:35:19 +01:00
Max Brunsfeld and Nathan Sobo
b67be5ded3
Add MultiBufferItemHandle
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-09 17:09:03 -08:00
Max Brunsfeld and Nathan Sobo
6731d92f60
Give the editor a handle to the project, not a weak handle to the workspace
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-08 15:48:44 -08:00
Max Brunsfeld
93bcde953c
Consolidate logic for completion alongside code actions in Project
...
This way, completions are dealt with more consistently with code actions,
and the logic is not spread across so many places. The `language::File`
trait and the multibuffer no longer need to deal with completions. Completions
are no longer generic over an anchor type.
2022-02-08 14:24:45 -08:00
Max Brunsfeld
5c7cea5a3e
WIP - Navigate to prev/next search result
2022-01-28 14:00:00 -08:00
Max Brunsfeld and Nathan Sobo
cefb63936d
Tweak diagnostic header styling
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 15:33:49 -08:00
Max Brunsfeld and Nathan Sobo
dbe969893c
Show icons and counts in the project diagnostics tab
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-25 12:31:55 -08:00
Max Brunsfeld
c9b4bb78f2
Merge branch 'project-diagnostics-pinned-tab' into style-project-diagnostics
2022-01-25 12:20:37 -08:00
Nathan Sobo
d192b6ebc7
Remove Worktree::abs_path
...
I'd like to only have methods related to absolute paths on local worktrees, because it's not really possible to implement them on remote worktrees since we don't know the full path being shared and wouldn't have anything to do with it anyway if we did.
2022-01-22 14:44:58 -07:00
Nathan Sobo
e2a2073bdb
Remove worktree_path from File struct
2022-01-22 14:29:36 -07:00
Nathan Sobo
a73671e57c
Revert "Replace project_path with project_entry in workspace::{Item, ItemView}"
...
This reverts commit 9c9a09cccb .
2022-01-21 11:07:10 -07:00
Antonio Scandurra
c450945001
WIP
2022-01-20 18:11:37 +01:00
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
71082d4cdc
Return a Task<Result<()>> in {ItemView,Buffer,MultiBuffer}::save
2022-01-20 09:58:24 +01: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 and Max Brunsfeld
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
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
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
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