Max Brunsfeld
7f6ddbc12e
Restructure status bar theme to style interactive elements more concisely
...
Introduce an `Interactive` wrapper type that allows themes to selectively
override properties of items in a hovered or active state.
2022-04-28 10:59:32 -07:00
Max Brunsfeld
0a4914f4bd
Combine diagnostic status w/ diagnostic message indicators
...
Improve the indicator styling
2022-04-27 14:25:39 -07:00
Max Brunsfeld
526ec9e283
Start re-styling diagnostic indicator in status bar
2022-04-27 14:25:39 -07:00
Max Brunsfeld and Nathan Sobo
476165f242
Allow dumping the project diagnostic view's state as JSON
...
Also, improve DebugElements action so that it shows the JSON in an editor.
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-04-11 19:51:46 -07:00
Max Brunsfeld
8bc0050578
Load all keybindings from JSON file
2022-04-10 14:29:45 -07:00
0cf9925cb1
Restructure action macro to assign a namespace to every action
...
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev >
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-07 16:20:49 -07:00
Max Brunsfeld
1e1f153e89
Fix diagnostic updates after restarting an LSP w/ a pending diagnostic job
2022-04-06 22:02:27 -07:00
Max Brunsfeld
b00373f24c
Update breadcrumbs when multibuffers' excerpts change
2022-04-06 17:12:36 -07:00
Max Brunsfeld and Keith Simmons
dce66e6f9e
Move Settings to its own crate
...
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:23:33 -07:00
Antonio Scandurra
cc11f45a1a
Introduce workspace::Item::reload to manually trigger a reload
2022-04-01 14:02:49 +02:00
Keith Simmons and Nathan Sobo
1eacdcf00a
Remove result from anchor cmp functions
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 11:48:31 -07:00
e0d394eaf6
Change language::anchor::min() to a constant
...
Co-authored-by: Antonio Scandurra <me@as-cii.com >
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 10:41:33 -07:00
dcb6b335e7
Make rename highlights work across multibuffer excerpts
...
Co-authored-by: Antonio Scandurra <me@as-cii.com >
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 10:22:47 -07:00
Antonio Scandurra
27fbbeffe9
WIP
2022-03-23 19:05:46 +01:00
Max Brunsfeld and Antonio Scandurra
41d2ba294f
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
0060010783
Add Editor::for_multibuffer and repurpose Editor::for_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 14:39:02 +01:00
Antonio Scandurra and Nathan Sobo
e158b79115
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
ac220025d8
Rename open_buffer_for_path to open_buffer
2022-03-17 11:42:13 +01:00
Antonio Scandurra
60c4428900
Rename ItemView to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
e2c28d19d1
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo and Max Brunsfeld
e5b82e80da
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-03-16 17:40:09 -06:00
29ab1f30bc
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
4c7d18530a
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
d567abe273
Only show errors and warnings in project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-15 15:30:05 +01:00
Max Brunsfeld
d2a4b6888c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Antonio Scandurra
3ad7272559
Merge pull request #525 from zed-industries/preserve-worktrees
...
Grow worktrees monotonically when sharing and move most messages to the background
2022-03-04 09:48:18 +01:00
Max Brunsfeld
3a1a9ecb45
Disable doctests for all libraries
...
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
2022-03-03 16:15:56 -08:00
Antonio Scandurra and Max Brunsfeld
819bf72dfc
Rename weak to visible
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-03-02 14:38:16 -08:00
Antonio Scandurra
79568c471a
Pass a reference to TestAppContext in tests
...
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Nathan Sobo and Max Brunsfeld
b212b31d0a
Open excerpts on alt-enter
...
Also: Remove special handling for alt-shift-D binding in diagnostics view that opens excerpts. Rely on alt-enter in all multi-buffers instead.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-02-25 16:49:28 -07:00
Antonio Scandurra and Max Brunsfeld
55ec98b42c
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
d15fb9c3dc
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
20d923b53e
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
Max Brunsfeld
0da0b2611e
Automatically include current view id in element state ids
2022-02-17 13:44:46 -08:00
Antonio Scandurra
8d3b696cc4
Fix panic caused by reusing the same handler for diagnostic status
2022-02-15 10:49:03 +01:00
5eaa51fd07
Always call set_selections in mouse selection methods
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-11 09:52:18 -08:00
Nathan Sobo and Max Brunsfeld
d2c81a378b
Pass the pending selection to update_selections and set_selections
...
This helps us preserve our invariant of always having at least a pending selection in set_selections when comparing old and new cursor positions.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-02-11 10:07:42 -07:00
Antonio Scandurra
e035758ba9
Move Buffer::format to Project::format
2022-02-11 12:07:46 +01:00
39baa4d0a3
Don't open a multibuffer when code actions's edits are contained in the current editor
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-10 09:55:21 -08:00
Antonio Scandurra
310d43618b
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
db9b19b1be
Allow inserting multiple excerpts in a batch
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-09 17:56:06 -08:00
Max Brunsfeld and Nathan Sobo
689e2af025
Remove ExcerptProperties struct
...
Pass buffer and range as separate parameters
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-09 17:52:17 -08:00
Max Brunsfeld and Nathan Sobo
ffc2260958
Add MultiBufferItemHandle
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-09 17:09:03 -08:00
Max Brunsfeld
ab8e3f8107
Get tests passing and project diagnostics view working w/ new excerpt headers
2022-02-09 13:51:52 -08:00
Antonio Scandurra and Nathan Sobo
f7fd68ef77
Render path headers in editor element
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-09 16:28:18 +01:00
Max Brunsfeld and Nathan Sobo
c477ca9308
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
08061504d4
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
b485554e64
Take an Into<AnyViewHandle> in ChildView::new
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-27 17:54:45 +01:00
Antonio Scandurra and Nathan Sobo
df51f7ae0a
Show non-disk-based diagnostics in project diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-27 16:23:50 +01:00
Antonio Scandurra
34f4346530
Style empty project diagnostics state
2022-01-27 10:21:26 +01:00