Kirill Bulatov
4d76162da8
Report the edits per transform summary generated
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2ba3262f29
Add line_len snapshot method
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ab7dd80423
Add more InlaySnapshot text summary impls
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
568a67c4d7
Implement more InlaySnapshot methods
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
daa2ebb57f
Calculate anchors for new hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
5fadbf77d4
Implement InlayHint sync method and fix the bugs
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
5ad85b44d6
Implement chunks of the InlayMap
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
3028767d12
Improve on inlya locations
2023-06-29 22:25:48 +03:00
Kirill Bulatov
b193d62a5d
Initial InlayMap tests and splice fn impl
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7397b8028c
Simplify inlay hint version handling
2023-06-29 22:25:48 +03:00
Kirill Bulatov
d506522eef
Correctly pass inlay hints
2023-06-29 22:25:48 +03:00
Kirill Bulatov
b5233b3ad5
Rename the new map
2023-06-29 22:25:48 +03:00
Kirill Bulatov
9287634548
Prepare to find diffs between inlay hint generations
2023-06-29 22:25:48 +03:00
Kirill Bulatov
78b3c9b88a
Store hints in the new map only
2023-06-29 22:25:48 +03:00
Kirill Bulatov
83f4320b60
Replace todo!s with stub calls to make Zed work
2023-06-29 22:25:48 +03:00
Kirill Bulatov
4c3c0eb796
Draft the hint render data flow
2023-06-29 22:25:48 +03:00
Kirill Bulatov
2ead3de7de
Add basic infrastructure for inlay hints map
2023-06-29 22:25:48 +03:00
Kirill Bulatov
6e3d1b962a
Draft the initial protobuf changes
2023-06-29 22:25:48 +03:00
Kirill Bulatov
387415eb01
Request hints for all buffers in editor
2023-06-29 22:25:48 +03:00
Kirill Bulatov
f83cfda9bc
React on message-less LSP requests properly
...
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7a268b1cf6
Improve obvious faults
2023-06-29 22:25:48 +03:00
Kirill Bulatov
79b97f9e75
Stub initial hint requests
2023-06-29 22:25:48 +03:00
Kirill Bulatov
8a3b515f56
Initial protocol check commit
2023-06-29 22:25:48 +03:00
Nathan Sobo
16c23557b8
vim: Fix scrolling ( #2647 )
...
After #2641 we noticed that scrolling didn't take a count parameter, and
a few other issues with the way that we calculated the distance to
scroll.
Release Notes:
- Improved distance calculations for page-up/page-down
- vim: Allow counts to work with scrolling shortcuts.
2023-06-27 04:01:14 -06:00
Conrad Irwin
a1343f0d2c
vim: Fix code actions menu
...
Fixes : zed-industries/community#1690
2023-06-26 21:46:06 -06:00
Conrad Irwin
02fc5dd6c9
vim: Fix scrolling
...
After #2641 we noticed that scrolling didn't take a count parameter.
The PageDown/PageUp logic was also broken by an additional -1 (for both
vim mode and not).
2023-06-26 13:29:14 -06:00
Nathan Sobo
cd008d1503
Add support for joining lines ( #2636 )
...
🚧 We have a couple more refinements to this to add 🚧
Release Notes:
You can now join lines with `ctrl-j` or `shift-J` in Vim normal mode.
🍐 'd with @ConradIrwin
2023-06-22 06:38:57 -06:00
Conrad Irwin
91bd8e305e
join_lines: Skip over leading indentation
2023-06-21 13:44:31 -06:00
Nate Butler
6ab0143469
Split Interactive into Interactive and Toggleable ( #2628 )
...
This is a part of the intensity driven theme rewrite.
It introduces the `toggle` and `interactive` helper functions to build
Toggle<T> and Interactive<T> styles for interactive elements in the
theme.
This PR also removes the `theme_testbench` crate and related actions.
Huge thanks to @osiewicz and @mikayla-maki for pushing this forward 🙏🏽
Release Notes:
- Updated the style of many interactive elements.
2023-06-21 15:03:08 -04:00
Nathan Sobo
cde8d7d747
Don't use test-only method; add ctrl-j binding
...
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-06-21 11:53:11 -06:00
Nathan Sobo
cf38264eda
Handle multiple selections when joining lines
...
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-06-21 11:47:06 -06:00
Nathan Sobo
61352f68ea
Add more assertions for joining lines at the end of the file
...
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-06-21 11:21:09 -06:00
Nathan Sobo
f07a929350
Allow joining multiple lines and deleting empty lines
...
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-06-21 11:18:28 -06:00
Nathan Sobo
c48bd394c1
Start on joining lines
...
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-06-21 10:32:02 -06:00
Mikayla Maki
11125a62c7
Add copy-on-click to diagnostic messages
2023-06-20 16:48:30 -07:00
Mikayla Maki
f1dc6124dd
Fix rebase mistake
2023-06-20 16:09:17 -07:00
Piotr Osiewicz
e92015b12f
Split out Interactive<T> into Toggle<T> and Interactive<T>
2023-06-20 16:05:20 -07:00
Nathan Sobo
8c298a9da5
Rename SumTree::push_tree to ::append
2023-06-19 19:49:33 -06:00
Antonio Scandurra
56b0bf8601
Save cursor scroll position when the editor is auto-scrolled
2023-06-14 12:00:27 +02:00
Antonio Scandurra
1aa1774688
Avoid auto-scrolling the editor when inserting/removing headers
2023-06-14 10:49:23 +02:00
Antonio Scandurra
27c83ca3f7
Remove unnecessary set_render_excerpt_header
method
2023-06-14 09:38:49 +02:00
Kevin Hovsäter
b365e48ff0
Toggle comments for empty single line selections ( #2594 )
2023-06-13 20:15:11 +02:00
Piotr Osiewicz
b272db9e21
editor: Add language setting for comment continuations ( #2605 )
...
Per @JosephTLyons request I've added a language setting for comment
continuations.
Release Notes:
- Added a language setting for comment continuations.
2023-06-13 18:59:46 +02:00
Max Brunsfeld
1cd11bfe66
Remove panic when programatically updating an invalid setting
2023-06-13 09:43:57 -07:00
Max Brunsfeld
e969e3b028
Sync selection between syntax tree view and editor
2023-06-12 15:14:57 -07:00
Max Brunsfeld
086cfe57c5
Start work on a syntax tree view
2023-06-12 15:14:56 -07:00
Piotr Osiewicz
5bef2f1778
Z-2303 editor: fix comment extension on the start of line ( #2595 )
...
Release Notes:
- Improved comment extension for cases where cursor was placed before
start of comment marker
2023-06-09 20:02:51 +02:00
Kevin Hovsäter
6ce3f3bf27
Refactor toggle comment tests
2023-06-09 13:22:04 +02:00
Kevin Hovsäter
a8d43c6d71
Toggle comments for empty single line selections
2023-06-09 10:10:49 +02:00
Max Brunsfeld
a7f06f962b
Enable type definition capability in fake LSPs in tests
2023-06-08 12:09:37 -07:00
Max Brunsfeld
351e4863cd
Fix some issues found when testing Elixir-LS ( #2583 )
...
Closes
https://linear.app/zed-industries/issue/Z-2209/popovers-dont-always-have-syntax-highlighted-code
Closes
https://linear.app/zed-industries/issue/Z-2206/highlight-syntax-in-hover-docs
* Fix a ton of errors in our logs due to us not recognizing that
`elixir-ls` does not support code actions.
* Syntax-highlight elixir code blocks in hover popovers
2023-06-07 12:21:48 -07:00
Max Brunsfeld
72372ddf0e
Highlight hover code blocks as LSP's own language by default
...
The elixir LSP does not include a language name on its elixir code blocks.
2023-06-07 10:01:19 -07:00
Piotr Osiewicz
e94129446d
Z 1618/extend comments ( #2585 )
...
Fixes Z-1618. In the current state, this only works for line comments
such as `//` (and whatever's set in `{language}.toml` as a
line_comment).
Release Notes:
- Comments are now extended on new line.
2023-06-07 17:37:02 +02:00
Antonio Scandurra
d26cc2c897
Maintain scroll bottom when streaming assistant responses
2023-06-07 15:01:50 +02:00
Max Brunsfeld
6f2726524e
Remove stray println
2023-06-06 17:13:59 -07:00
Antonio Scandurra
7a78e64831
Merge remote-tracking branch 'origin/main' into assistant-2
2023-06-06 19:18:22 +02:00
Antonio Scandurra
f4f060667e
Add assertion to pinpoint how deletion works across excerpts
2023-06-06 12:36:26 +02:00
Antonio Scandurra
337dda8e3a
Only remove excerpts when an edit touches them
2023-06-06 12:27:05 +02:00
Antonio Scandurra
8032324470
Prevent moving across excerpts on Editor::delete
2023-06-06 12:26:53 +02:00
Antonio Scandurra
e46d1549d6
Retain selection's head (as opposed to its end) on insertion
...
This makes a difference when an edit spans two excerpts and the selection
start won't necessarily be the same as the selection end after the edit.
2023-06-06 10:12:15 +02:00
Nathan Sobo
23836eb251
Not working yet: Remove empty messages unless they contain the cursor
...
Problem is, I'm trying to trust the excerpt id of the selection head,
but it's a sentinel value and not the actual excerpt id of the message.
I think we probably need to resolve to offsets instead.
2023-06-05 22:58:08 -06:00
Joseph Lyons
70c5489c13
Stop sending editor events to mixpanel
2023-06-05 15:09:47 -04:00
Joseph Lyons
7c60f636d5
Fix typos
2023-06-02 22:02:19 -04:00
Piotr Osiewicz
345fad3e9d
editor: add select previous command ( #2556 )
...
Added a `select previous` command to complement `select next`.
Release Notes:
- Added "Select previous" editor command, mirroring `Select next`.
Ticket number: Z-366
2023-06-02 17:32:34 +02:00
Antonio Scandurra
f00f16fe37
Show remaining tokens
2023-06-02 17:27:21 +02:00
Antonio Scandurra
cf934ab696
Fix compile errors
2023-06-02 10:08:06 +02:00
Antonio Scandurra
20e65a533c
Merge remote-tracking branch 'origin/main' into assistant-2
2023-06-02 09:32:11 +02:00
Max Brunsfeld
e67e6e6f70
Fix ambiguous glob export warnings in rust 1.70
2023-06-01 14:07:59 -07:00
Max Brunsfeld
788f97ec68
Add support for folder-specific settings ( #2537 )
...
This PR allows you to customize Zed's settings within a particular
folder by creating a `.zed/settings.json` file within that folder.
Todo
* [x] respect folder-specific settings for local projects
* [x] respect folder-specific settings in remote projects
* [x] pass a path when retrieving editor/language settings
* [x] pass a path when retrieving copilot settings
* [ ] update the `Setting` trait to make it clear which types of
settings are locally overridable
Release Notes:
* Added support for folder-specific settings. You can customize Zed's
settings within a particular folder by creating a `.zed` directory and a
`.zed/settings.json` file within that folder.
2023-05-31 16:27:08 -07:00
Max Brunsfeld
0dd7694ff5
Make language_settings take a language, not a language name
2023-05-31 15:10:30 -07:00
Max Brunsfeld
03a351fb26
Make language settings accessors take an arc dyn file
2023-05-31 14:57:04 -07:00
Max Brunsfeld
a2ab7c9eb9
Respect project-specific settings for copilot
2023-05-31 14:42:15 -07:00
Antonio Scandurra
dc365472a6
Merge remote-tracking branch 'origin/main' into assistant-2
2023-05-30 15:11:06 +02:00
Max Brunsfeld
89446c7fd4
Start work on respecting project-specific settings
2023-05-29 14:25:49 -07:00
Antonio Scandurra
88eb2b2163
Move history navigation logic to Workspace
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-29 19:47:59 +02:00
Antonio Scandurra
52e8bf2928
Show custom header for assistant messages
2023-05-29 15:57:55 +02:00
Nathan Sobo
3904971bd8
Hide assistant gutter
2023-05-26 15:38:03 -06:00
Julia
5e39ba596e
Clean up final remaining code paths calling old diff update method
2023-05-25 14:41:09 -04:00
Julia
8d662edb6c
Remove concept of git diff refresh from Item
trait
2023-05-25 14:29:28 -04:00
Julia
cede296b04
Project level git diff recalc handling
...
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies
Now all recalcs started at the same time must complete before
A: Starting another recalc pass
B: The master notify occurring
Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-05-25 14:10:27 -04:00
Kirill Bulatov
739d5ca373
Have proper undo for both client and host
2023-05-25 18:29:57 +03:00
Kirill Bulatov
e2ff829f98
Use Transaction instead of ProjectTransaction
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-25 16:12:14 +03:00
Kirill Bulatov
aa58d0fd77
Do not send edits over the wire
2023-05-25 12:55:44 +03:00
Kirill Bulatov
d1f4b60fa1
Allow to disable the new feature
2023-05-25 09:45:50 +03:00
Kirill Bulatov
b9dabb165e
Use formatting options
2023-05-25 09:45:50 +03:00
Kirill Bulatov
f6d7b3d2e8
Send and handle OnTypeFormatting LSP request
2023-05-25 09:45:50 +03:00
Nathan Sobo
747322a02d
Merge remote-tracking branch 'origin/main' into zmd
2023-05-24 11:04:07 -06:00
Antonio Scandurra
35f9996a4f
WIP
2023-05-24 18:45:47 +02:00
Antonio Scandurra
2a8e0824a6
Fix opening excerpt when the cursor is at the end of a multi-buffer
...
This was caused by seeking with a right bias, which in the case of the
last excerpt in the buffer would seek past the end of the buffer. This
commit changes the behavior to move the cursor back to the previous excerpt
if we overshoot, to ensure we always land on an excerpt.
2023-05-24 15:02:57 +02:00
Antonio Scandurra
208ff2fba7
Merge remote-tracking branch 'origin/main' into panels
2023-05-23 08:24:28 +02:00
Nathan Sobo
234dbc3ca9
WIP
2023-05-23 00:16:44 -06:00
Nathan Sobo
30de64845f
WIP
2023-05-22 23:11:27 -06:00
Mikayla Maki
fc82489128
Update scrollbar styling
2023-05-22 16:23:36 -07:00
Mikayla Maki
5c31c84c90
Fixed contrast in project panel and scrollbar
...
co-authored-by: nate <nate@zed.dev>
2023-05-22 15:51:31 -07:00
Mikayla Maki
2d1c4a1971
Revert "Touch up git in project panel and scroll bar styling"
2023-05-22 15:31:14 -07:00
Mikayla Maki
9bec74f1d4
fmt
2023-05-22 15:04:51 -07:00
Mikayla Maki
9a47415cb5
Merge branch 'main' into git-project-panel-and-scrollbar-styling
2023-05-22 15:02:28 -07:00
Mikayla Maki
1d07cff765
Adjust scrollbar settings to be expandable ( #2507 )
...
Note that this PR cannot be cherrypicked into preview, as it relies on
the new settings infrastructure.
Switches settings from `show_scrollbars: "auto"` to `scrollbar: {show:
"auto", git_diffs: true}`.
fixes
https://linear.app/zed-industries/issue/Z-1650/scroll-bar-feature-settings
Release Notes:
- Changed scrollbar settings from `show_scrollbars: "auto"` to
`scrollbar: {show: "auto", git_diffs: true}`. (preview only)
2023-05-22 12:51:21 -07:00
Mikayla Maki
dcb987ba9d
Diagnostics pane was not focusable with the mouse ( #2506 )
...
fixes
https://linear.app/zed-industries/issue/Z-1432/cant-cmd-w-an-empty-diagnostics-in-a-split-pane
Release Notes:
* Fixed a bug where the diagnostics pane could not be focused or closed
in certain circumstances.
2023-05-22 12:44:39 -07:00
Mikayla Maki
cfdf9198da
Switch back to
2023-05-22 12:16:47 -07:00
Mikayla Maki
687ccd4c6f
fmt
2023-05-22 12:13:23 -07:00
Mikayla Maki
366f13bb5c
Adjust scrollbar settings to be expandable
2023-05-22 12:12:56 -07:00
Mikayla Maki
bafc1d922e
fmt
2023-05-22 11:46:52 -07:00
Mikayla Maki
e59c8e9d61
Fix diagnostic pane not being closeable
2023-05-22 11:44:23 -07:00
Max Brunsfeld
e129ed2d91
Fix spurious setting error log messages ( #2498 )
...
Fixes a bug introduced in
https://github.com/zed-industries/zed/pull/2448 , where error messages
would be logged if the user config didn't specify certain fields like
`journal` or `telemetry`.
2023-05-22 11:44:21 -07:00
Julia
a69144911f
Add paragraph based vertical movements ( #2502 )
...
Very selfish patch I worked on yesterday, I kept saying I wanted these
and finally decided to just add them. Feedback on the keybindings
welcome
Release Notes:
* Added `MoveToStartOfParagraph` and `MoveToEndOfParagraph` movements
for paragraph based vertical navigation
2023-05-22 14:31:34 -04:00
Mikayla Maki
6264b24788
fmt
2023-05-22 11:04:36 -07:00
Mikayla Maki
8669dcdc81
Make scrollbar content detection cheaper
...
Remove scrollbars from multibuffers
co-authored-by: max <max@zed.dev>
2023-05-22 10:55:44 -07:00
Mikayla Maki
af73c1af06
Add seperate scrollbar styling
2023-05-22 10:03:02 -07:00
Julia
44903bc193
Add test for paragraph vertical movements
2023-05-22 11:48:07 -04:00
Julia
7190840081
Add paragraph based vertical movements
2023-05-22 09:12:36 -04:00
Antonio Scandurra
146809eef0
Merge branch 'main' into panels
2023-05-22 14:10:17 +02:00
Mikayla Maki
bbb68c523c
Refactored apart the forward and the backwards iterator for diff hunks
2023-05-19 18:09:47 -07:00
Max Brunsfeld
e32233c826
Fix spurious setting error logs on non-existent setting keys
2023-05-19 17:15:05 -07:00
Mikayla Maki
c795c9b844
Rearrange git tests in worktree
...
Add support for renaming work directories
2023-05-19 16:30:00 -07:00
Mikayla Maki
623a177fe6
Fix bug where git diff hunks would not extend through a soft wrap
2023-05-19 16:23:45 -07:00
Mikayla Maki
2a41a32aac
Calculate y offsets correctly
2023-05-19 16:23:45 -07:00
Max Brunsfeld
847d1e73a3
Replace remaining usages of glob crate with globset
2023-05-19 09:36:46 -07:00
Max Brunsfeld
58f704abcb
Avoid unnecessary code action requests when applying leader updates to an editor
2023-05-18 14:46:23 -07:00
Max Brunsfeld
42eca3048f
Move font size adjustment code to the theme crate
2023-05-17 15:56:32 -07:00
Max Brunsfeld
258723566f
Rename settings::register_setting -> settings::register
2023-05-17 15:06:11 -07:00
Max Brunsfeld
2d5f03e148
Remove optional path argument when getting settings
2023-05-17 15:05:20 -07:00
Max Brunsfeld
1f0e79ee9d
Merge branch 'main' into setting-store
2023-05-17 14:56:35 -07:00
Max Brunsfeld
67a25126d4
Define theme/ui text style settings in theme crate
2023-05-17 14:44:59 -07:00
Mikayla Maki
f4e99ecde4
Add never option to scrollbar settings
2023-05-17 14:19:35 -07:00
Mikayla Maki
6cf439e734
fmt
2023-05-17 14:12:04 -07:00
Mikayla Maki
ae3394f4de
Add scrollbars setting
2023-05-17 14:09:26 -07:00
Mikayla Maki
aa89632286
Add diff hunks to the scroll bar
2023-05-17 11:40:30 -07:00
Max Brunsfeld
89204e85c0
Merge branch 'main' into setting-store
2023-05-17 09:55:24 -07:00
Max Brunsfeld
6403bb86e1
Define workspace settings in workspace crate
2023-05-16 20:25:18 -07:00
Max Brunsfeld
cbd4771f10
Define project settings in project crate
2023-05-16 17:45:04 -07:00
Max Brunsfeld
65e3713d4d
Define editor settings in editor crate
2023-05-16 17:30:29 -07:00
Max Brunsfeld
39618ae32d
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Joseph Lyons
c27859871f
Send editor event when saving a new file
2023-05-16 18:16:09 -04:00
Joseph T. Lyons
2e27f26339
Merge pull request #2475 from zed-industries/add-copilot-events
...
Add events for copilot suggestion accepting and discarding
2023-05-16 17:25:54 -04:00
Joseph Lyons
ffd503951b
Don't make events for every rejected suggestion
2023-05-16 17:19:05 -04:00
Kirill Bulatov
d719352152
Unify path:row:column parsing, use it in CLI
2023-05-16 21:07:26 +03:00
Kirill Bulatov
89fe5c6b09
Test caret selection in file finder
...
co-authored-by: Max <max@zed.dev>
2023-05-16 21:07:26 +03:00
Kirill Bulatov
e9606982e6
Use ':' instead of ',' to separate files, rows and columns
2023-05-16 21:07:26 +03:00
Joseph Lyons
afe75e8cbd
Send copilot events even if file_extension is not known at the time
2023-05-16 14:02:36 -04:00
Joseph Lyons
6976d60bfe
Rework code to contain submitting of copilot events within editor
2023-05-16 13:26:05 -04:00
Mikayla Maki
ead9ac6f23
Fix typo
2023-05-15 16:47:46 -07:00
Mikayla Maki
606d5e36e1
Add events for copilot suggestion accepting and discarding
2023-05-15 16:44:09 -07:00
Mikayla Maki
2b18975cdc
Change folder styling from a reduce over all child files to a simple 'always modified'
...
Remove git status from tab titles
2023-05-15 16:20:01 -07:00
Mikayla Maki
5e2aaf45a0
Fix repository initialization bug
2023-05-13 10:38:24 -07:00
Mikayla Maki
41bef2e444
Refactor out git status into FileName component
...
Integrate file name component into the editor's tab content
2023-05-13 02:26:45 -07:00
Max Brunsfeld
bc5b78198a
Define terminal settings in terminal crate
2023-05-10 17:43:10 -07:00
Max Brunsfeld
cee7edabf9
Ensure the SettingsStore global is added in tests
2023-05-10 16:39:59 -07:00
Max Brunsfeld
aa6ea920e2
Define telemetry settings in the client crate
2023-05-10 12:59:24 -07:00
Max Brunsfeld
9b06be2aa2
Define vim_mode setting in vim crate
2023-05-10 12:59:24 -07:00