Max Brunsfeld
b07b08862b
Merge pull request #863 from zed-industries/fix-project-symbols-crash
...
Fix project symbols crash
2022-04-20 16:09:25 -07:00
Max Brunsfeld
3619d4c1c4
Always notify a Picker when its delegate notifies
2022-04-20 16:03:11 -07:00
Max Brunsfeld
84df1d6564
Add unit test for project symbols that demonstrates crash
2022-04-20 16:02:37 -07:00
Nathan Sobo
9150b77471
Remove some user-facing routes
2022-04-20 15:39:39 -06:00
Keith Simmons
b1f9d9d8ba
Merge pull request #851 from zed-industries/vim-delete-jk-fix
...
Linewise motions fix
2022-04-20 14:34:05 -07:00
Nate Butler
09634dffb8
Merge pull request #846 from zed-industries/update-themes-04-19
...
Update theme for command palette, inputs, tabs, autocomplete
2022-04-20 12:05:00 -04:00
Nate Butler
ea11f2e183
Increase min-width for all Pickers, minor style changes
...
- Increases the Picker min-width from 500 to 540
- Makes some changes to the styling of keyboard shortcuts in the command palette
2022-04-20 11:54:57 -04:00
Antonio Scandurra
a210b05d00
Remove App::on_open_files
, as it's a subset of on_open_urls
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:36:27 +02:00
Antonio Scandurra
d725876e64
💄
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:36:03 +02:00
Antonio Scandurra
07562c2ccd
Locate app bundle based on location of CLI binary
...
The app bundle can also be specified via `-b` or `--bundle-path`.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:29:12 +02:00
Antonio Scandurra
f77239bd96
Add application menu to install CLI
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:29:10 +02:00
Antonio Scandurra
926c75dadf
Implement zed --version
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:28:31 +02:00
Antonio Scandurra
5ab35bd6fd
Remove stray dbg
2022-04-20 17:28:31 +02:00
Antonio Scandurra
f7055c2acc
Implement zed --wait
2022-04-20 17:28:31 +02:00
Antonio Scandurra
b013b1ba5d
Call language::init_test
in test_single_file_worktrees_diagnostics
2022-04-20 17:28:31 +02:00
Antonio Scandurra
b3f2b7a92c
Use osascript to escalate privileges and copy the CLI to /usr/local/bin
2022-04-20 17:28:30 +02:00
Max Brunsfeld
0d9a0e2cbe
Avoid permissions error when installing CLI symlink
2022-04-20 17:27:33 +02:00
Max Brunsfeld
fbd1afc51f
Add a command for installing the CLI
2022-04-20 17:27:33 +02:00
Max Brunsfeld
eee1cec3d4
🎨 Remove unnecessary JoinProjectParams struct
2022-04-20 17:27:33 +02:00
Max Brunsfeld
a81f7ebbf6
Locate the Zed app from the CLI using NSWorkspace API
2022-04-20 17:27:33 +02:00
Max Brunsfeld
43763fa2f8
Allow opening paths from the CLI
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-20 17:27:31 +02:00
Nathan Sobo
05c44b9414
Process incoming CLI requests on the main thread
2022-04-20 17:15:46 +02:00
Nathan Sobo
75f0326e54
Use ipc_channel crate to communicate between cli and app
...
We still aren't handling CLI requests in the app, but this lays the foundation for bi-directional communication.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-20 17:15:46 +02:00
Antonio Scandurra
01eb2dce24
WIP: Start on a new cli
crate
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:15:45 +02:00
Antonio Scandurra
0c98168227
v0.28.1
2022-04-20 15:21:15 +02:00
Antonio Scandurra
8ef6b1d8a9
Don't emit event when LSP reports consecutive empty diagnostics
...
This is related to #849 : in that pull request we avoided *storing*
empty diagnostics, but we'd still report an event when receiving
consecutive empty diagnostics. So if the project diagnostics editor
was open, it could happen that opening a buffer would cause the
language server to report zero diagnostics. We would therefore close
the buffer because there were no diagnostics, but doing so would cause
the LSP to report another event with zero diagnostics. This would repeat
forever, causing Zed to use a lot of CPU and the UI not to refresh properly.
With this commit we will simply avoid emitting a `DiagnosticsUpdated` event
altogether if no diagnostics were present before *and* the LSP is reporting
a `PublishDiagnostics` event with no diagnostics in it.
2022-04-20 15:02:38 +02:00
Max Brunsfeld
717ebe6a4c
Don't cancel match updates when picker query changes
...
The file finder often cancels an in-progress match task when
the project updates. But it still needs to take the matches
that it did find and add them to its results. So we should
not cancel the entire task, as this will cause the
partial results to be discarded.
2022-04-19 13:16:57 -07:00
Max Brunsfeld
47379677f2
Update file finder correctly when project files change
2022-04-19 13:10:36 -07:00
Keith Simmons
8ff0277103
Handle linewise motions correctly and fix panic when executing invalid actions
2022-04-19 11:36:44 -07:00
Nathan Sobo
93d307aecb
Navigate to best match when updating outline view query
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-19 10:12:42 -06:00
Nathan Sobo
360b876f36
v0.28.0
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-19 09:40:32 -06:00
Antonio Scandurra
ef784cf21e
Remove summaries that don't contain any errors or warnings
...
When opening a buffer, some language servers might start reporting
diagnostics. When closing a buffer, they might report that no diagnostics
are present for that buffer. Previously, we would keep an empty summary entry
which would cause us to open a buffer in the project diagnostics view, only to
drop it because it contained no diagnostics. However, the act of opening it
caused the language server to asynchronously report non-empty diagnostics.
We would therefore handle this as an update, but the previous closing of the
buffer would cause the language server to report empty diagnostics again. This
would cause the project diagnostics view to thrash infinitely between these two
states, pegging the CPU and constantly refreshing the UI.
With this commit we won't maintain empty summary entries for files that contain
no diagnostics, which fixes the above issue.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-19 15:30:46 +02:00
Antonio Scandurra
eaa6637b05
Use the entire ProjectPath
to find open buffer for an LSP diagnostic
...
Previously, we would only compare the path relative to the worktree root, which
would cause Zed to sometimes update diagnostics on the wrong buffer. This
manifested in the project diagnostics not showing those errors/warnings while
the status bar and the tab title displayed a summary with errors/warnings.
This commit simply uses `Project::get_open_buffer` which correctly locates a
buffer with the given project path.
2022-04-19 12:06:14 +02:00
Max Brunsfeld
d8ad0d8e4e
Format action names more readably in command palette
...
Also add a unit test for the command palette
2022-04-18 18:12:43 -07:00
Max Brunsfeld
a4f259066b
tmp
2022-04-18 17:30:17 -07:00
Max Brunsfeld
11eba96cb8
Allow toggling other modals from the command palette
2022-04-18 17:11:39 -07:00
Max Brunsfeld
f5377c2f50
Highlight fuzzy match positions in command palette
2022-04-18 17:11:39 -07:00
Max Brunsfeld
3bbc021a7e
Use Picker in Outline view
2022-04-18 17:11:39 -07:00
Max Brunsfeld
c56e2ead23
Fix hang when dropping ::scoped future under deterministic executor
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max Brunsfeld
df0b5779a8
Remove unused crossbeam-channel dependency in zed crate
...
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max Brunsfeld
d0413ac0e1
Fix crash when dropping a task that is awaiting a call to Background::scoped
...
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max Brunsfeld
20657566b3
Make all pickers respect mouse clicks
2022-04-18 17:11:39 -07:00
Max Brunsfeld
c7527f92a4
Use Picker in FileFinder
2022-04-18 17:11:39 -07:00
Max Brunsfeld
c75ffc583c
Use Picker in ProjectSymbolsView
2022-04-18 17:11:39 -07:00
Max Brunsfeld
7b16860806
Use Picker in ThemeSelector
2022-04-18 17:11:39 -07:00
Max Brunsfeld
7964464e3d
Rename SelectorModal -> Picker, put it in its own crate
2022-04-18 17:11:39 -07:00
Max Brunsfeld
bde52d5c93
Add basic styling to keystrokes in command palette
2022-04-18 17:11:37 -07:00
Max Brunsfeld
3901d9d544
Display key bindings in the command palette
...
They still need to be styled.
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-04-18 17:11:08 -07:00
Max Brunsfeld
4630071f58
Start work on a command palette
2022-04-18 17:11:08 -07:00
Max Brunsfeld
99f8466cb5
Add a gpui method for listing the available actions
2022-04-18 17:11:07 -07:00
Keith Simmons
5c6a2ac7e6
Merge pull request #812 from zed-industries/js-jsx-language
...
Add javascript and jsx specific languages
2022-04-18 16:19:54 -07:00
Keith Simmons
26f2aa4d69
Swap to parsing javascript as jsx
2022-04-18 15:26:57 -07:00
Keith Simmons
dd25ab5798
Revert d/c j and k binding special casing
2022-04-18 14:44:11 -07:00
Keith Simmons
dcd5922609
Merge jsx language into js
2022-04-18 14:21:23 -07:00
Keith Simmons
63278041e1
Add c and d operators to vim normal mode
...
Extracted motions from normal mode
Changed vim_submode to be vim_operator to enable better composition of operators
2022-04-15 16:05:50 -07:00
Antonio Scandurra
2695b13947
Always clear rename state when selections change
...
At some point during the implementation of rename, we added logic for
invalidating the rename state when the selection moved outside the original
rename range. After transitioning to displaying renames as a block decoration,
we don't need that anymore given that a new, temporary editor is used instead.
This commit removes that invalidation logic and always calls `Editor::take_rename`
when the editor selections change. Doing so also fixes a bug that was causing Zed
to hide the cursor when clicking on the editor to dismiss the rename.
2022-04-15 10:32:07 +02:00
Nathan Sobo
9820c6ba64
Merge pull request #822 from zed-industries/focus-project-search-query
...
Fix focus bugs in `ProjectSearchView`
2022-04-14 12:25:59 -06:00
Max Brunsfeld
3cdda79fc3
Merge pull request #817 from zed-industries/dynamic-editor-highlights
...
Store accessors for editor highlight colors not colors themselves
2022-04-14 10:36:38 -07:00
Antonio Scandurra
77d3cc359e
Fix tests
2022-04-14 18:50:45 +02:00
Antonio Scandurra
ce3a31d8bd
Persist project search focus state
...
...so that we can re-focus the previously-active editor when switching back
to the project search tab.
2022-04-14 18:36:42 +02:00
Antonio Scandurra
5a8297a02f
Introduce ViewContext::observe_focus
2022-04-14 18:22:55 +02:00
Nathan Sobo
27057fdb1b
Only process a single focus effect per batch
...
This allows us to focus the query editor of the project search when deploying it. Previously, a complex interplay between focus events was preventing this from working in an intuitive way. What happened previously:
- We'd activate the project search, which enqueued a focus effect for the project search view
- We'd focus the query editor, which enqueued an effect
- We'd process the focus effect for the search view, which would enqueue an effect to transfer focus to the results editor
- We'd process the effect to focus the query editor
- We'd process the effect to focus the results editor
Now...
- We activate the project search pane item, enqueuing a focus effect for the project search itself
- We focus the query editor and *remove* the previous pending focus change effect
- We process the focus effect
2022-04-14 08:52:24 -06:00
Nathan Sobo
c4203868ea
Revert "Focus Project Search query editor always when deployed"
2022-04-14 07:53:15 -06:00
Antonio Scandurra
6d33697e82
Fix warning
2022-04-14 13:03:46 +02:00
Antonio Scandurra
1a1d670104
Speed up WrapSnapshot::line_len
using the indexed transforms
2022-04-14 13:01:29 +02:00
Antonio Scandurra
91d4c835ad
Introduce TabMap::line_len
2022-04-14 12:55:33 +02:00
Max Brunsfeld
e1b4bbfcf1
Merge pull request #815 from zed-industries/stale-search-match-count
...
Notify when buffer search matches change
2022-04-13 15:41:30 -07:00
Max Brunsfeld
efa6af427d
Merge pull request #816 from zed-industries/render-icon-panic
...
Don't panic when allocating tiny_skia pixmap
2022-04-13 15:31:47 -07:00
Keith Simmons
292d075f81
Store accessors for editor highlight colors not colors themselves
2022-04-13 15:30:57 -07:00
Max Brunsfeld
08e55f77b8
Merge pull request #814 from zed-industries/nav-history-scroll-position
...
Record scroll position in nav history
2022-04-13 15:23:53 -07:00
Keith Simmons
4b55b578b2
Don't panic when allocating tiny_skia pixmap
2022-04-13 14:57:16 -07:00
Keith Simmons
b893cb6d82
rename NavigationData anchor and offset to cursor_anchor and cursor_offset
2022-04-13 14:53:47 -07:00
Keith Simmons
8cde15cb72
Notify when buffer search matches change
2022-04-13 14:49:18 -07:00
Max Brunsfeld
031472dc5a
0.27.0
2022-04-13 14:00:09 -07:00
Keith Simmons
9cec6d8d65
add comment explaining offsets
2022-04-13 13:30:07 -07:00
Nathan Sobo
6985d360c8
Merge pull request #811 from zed-industries/font-fallback-3
...
Implement font fallback and emoji rendering
2022-04-13 14:08:57 -06:00
Keith Simmons
f20e3f35a1
Record scroll position in nav history
2022-04-13 12:30:33 -07:00
Max Brunsfeld
2ea2ba358f
Add back toggle sidebar key bindings
2022-04-13 11:14:10 -07:00
Keith Simmons
544ca443e3
Add javascript and jsx specific languages
2022-04-13 10:58:42 -07:00
Antonio Scandurra
8e89074714
Reduce allocations when caching fonts
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-13 19:06:34 +02:00
Max Brunsfeld
847322215e
0.26.0
2022-04-13 09:34:42 -07:00
Antonio Scandurra
cdcdccfb89
Render emojis
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-13 17:31:10 +02:00
Antonio Scandurra
fff1d9c631
Implement glyph scaling in a way that works with emojis as well
2022-04-13 15:56:32 +02:00
Keith Simmons
4249b5687e
Implement font fallback in layout_line
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-04-13 11:42:19 +02:00
Antonio Scandurra
6cc9306f00
Make room for font subpixel variants correctly
2022-04-13 11:36:54 +02:00
Antonio Scandurra
6b629dfa5c
Use CTFont::draw_glyphs
to rasterize glyphs
...
This API supports rendering emojis in addition to normal glyphs.
2022-04-12 19:37:26 +02:00
Antonio Scandurra
4e057da69b
Update contacts list when a project is shared
2022-04-12 11:41:20 +02:00
Antonio Scandurra
71beebc913
Fix warning
2022-04-12 10:52:16 +02:00
Antonio Scandurra
1d84876cfd
Adjust distribution in randomized test
2022-04-12 10:15:38 +02:00
Antonio Scandurra
3e4bc75160
Merge branch 'main' into randomized-test-improvements
2022-04-12 10:14:08 +02:00
Antonio Scandurra
56b9e5b0a0
Make Server::update_contacts_for_users
always synchronous
2022-04-12 09:44:23 +02:00
Antonio Scandurra
c06e5f3d1e
Limit incoming size to 1 in tests to more easily simulate backpressure
2022-04-12 09:43:36 +02:00
Max Brunsfeld
6317c049c5
Merge pull request #800 from zed-industries/tolerate-lsp-workspace-symbols-failure
...
Avoid bailing out of Project::symbols when one LSP request fails
2022-04-11 21:14:51 -07:00
Max Brunsfeld
ae9f71cc07
Avoid bailing out of Project::symbols when one LSP request fails
2022-04-11 21:09:01 -07:00
Max Brunsfeld
aa37c364bb
Merge pull request #799 from zed-industries/debug-project-diagnostics-as-json
...
Allow dumping the project diagnostic view's state as JSON
2022-04-11 20:40:50 -07:00
Max Brunsfeld
949fbe7cd3
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
Nathan Sobo
d8e4e924cc
Merge branch 'main' into collab-renames
2022-04-11 19:07:07 -06:00
Max Brunsfeld
54d49c13d9
Merge pull request #795 from zed-industries/cancel-buffer-search
...
Handle editor cancel in pane in order to dismiss find toolbar
2022-04-11 17:47:44 -07:00
Max Brunsfeld
a754c3015f
Merge pull request #762 from zed-industries/safer-atlas-allocation
...
Safer Atlas Allocation
2022-04-11 17:42:53 -07:00
Max Brunsfeld
300feb5d57
Merge pull request #797 from zed-industries/project-search-focus
...
Focus Project Search query editor always when deployed
2022-04-11 17:41:08 -07:00