Commit Graph
3816 Commits
Author SHA1 Message Date
Max Brunsfeld 84df1d6564 Add unit test for project symbols that demonstrates crash 2022-04-20 16:02:37 -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 1da515010b Merge pull request #859 from zed-industries/cli
Add a zed command-line tool
2022-04-20 17:49:08 +02:00
Antonio ScandurraandNathan Sobo 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 ScandurraandNathan Sobo d725876e64 💄
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:36:03 +02:00
Antonio ScandurraandNathan Sobo 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 ScandurraandNathan Sobo f77239bd96 Add application menu to install CLI
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:29:10 +02:00
Antonio ScandurraandNathan Sobo 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 184a454f6f Update bundle script to include fat CLI binary 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 BrunsfeldandAntonio Scandurra 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 SoboandMax Brunsfeld 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 ScandurraandNathan Sobo 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 b9511afa12 Merge pull request #860 from zed-industries/fix-more-project-diagnostics-cycles
Don't emit event when LSP reports consecutive empty diagnostics
2022-04-20 15:18:58 +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 c2fa7b9bf9 Merge pull request #857 from zed-industries/file-finder-fixes
File finder fixes
2022-04-19 13:40:40 -07: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
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 SoboandAntonio Scandurra 360b876f36 v0.28.0
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-19 09:40:32 -06:00
Antonio Scandurra e8728f4ce2 Merge pull request #849 from zed-industries/fix-project-diagnostic-ui-glitch
Remove summaries that don't contain any errors or warnings
2022-04-19 17:13:32 +02:00
Antonio ScandurraandNathan Sobo 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 1cd23df4d8 Merge pull request #848 from zed-industries/out-of-sync-diagnostics
Use the entire `ProjectPath` to find open buffer for an LSP diagnostic
2022-04-19 13:03:19 +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
Nate Butler 484204c2a0 Reduce key icon size to avoid extra padding on command palette item
- Also remove unneeded imports
2022-04-19 02:48:35 -04:00
Nate Butler 408f8d4297 Update inputs, tabs, pickers, autocomplete 2022-04-19 02:34:45 -04:00
Max Brunsfeld d99c74d874 Merge pull request #823 from zed-industries/command-palette
Command palette
2022-04-18 18:24:31 -07:00
Max Brunsfeld 0af129d50a Use primary text color for keystrokes in command palette 2022-04-18 18:14:45 -07: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
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 BrunsfeldandKeith Simmons 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 BrunsfeldandKeith Simmons 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