Commit Graph
1674 Commits
Author SHA1 Message Date
Nathan Sobo e526fd506e Rename SumTree::push_tree to ::append 2023-06-19 19:49:33 -06:00
Antonio Scandurra 26adb28be2 Save cursor scroll position when the editor is auto-scrolled 2023-06-14 12:00:27 +02:00
Antonio Scandurra ee5a23b04c Avoid auto-scrolling the editor when inserting/removing headers 2023-06-14 10:49:23 +02:00
Antonio Scandurra 80cd172c7e Remove unnecessary set_render_excerpt_header method 2023-06-14 09:38:49 +02:00
Kevin Hovsäter b84122ff10 Toggle comments for empty single line selections (#2594) 2023-06-13 20:15:11 +02:00
Piotr Osiewicz 9b1eed8ff2 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 f14568bcc3 Remove panic when programatically updating an invalid setting 2023-06-13 09:43:57 -07:00
Max Brunsfeld 36a1be982a Sync selection between syntax tree view and editor 2023-06-12 15:14:57 -07:00
Max Brunsfeld a3435cd0b0 Start work on a syntax tree view 2023-06-12 15:14:56 -07:00
Piotr Osiewicz 2af4620ad7 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 a2f5c2b17e Refactor toggle comment tests 2023-06-09 13:22:04 +02:00
Kevin Hovsäter 2cd8e966ba Toggle comments for empty single line selections 2023-06-09 10:10:49 +02:00
Max Brunsfeld 7018e5cff4 Enable type definition capability in fake LSPs in tests 2023-06-08 12:09:37 -07:00
Max Brunsfeld 505538f761 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 c861083f13 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 107c6e64dc 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 b9bd4b8efb Maintain scroll bottom when streaming assistant responses 2023-06-07 15:01:50 +02:00
Max Brunsfeld e018579307 Remove stray println 2023-06-06 17:13:59 -07:00
Antonio Scandurra 82749a0483 Merge remote-tracking branch 'origin/main' into assistant-2 2023-06-06 19:18:22 +02:00
Antonio Scandurra 6be252cbcf Add assertion to pinpoint how deletion works across excerpts 2023-06-06 12:36:26 +02:00
Antonio Scandurra e839eac008 Only remove excerpts when an edit touches them 2023-06-06 12:27:05 +02:00
Antonio Scandurra 37c5b86768 Prevent moving across excerpts on Editor::delete 2023-06-06 12:26:53 +02:00
Antonio Scandurra 35ffe5101d 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 90ff3b8067 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 396846c973 Stop sending editor events to mixpanel 2023-06-05 15:09:47 -04:00
Joseph Lyons 4b5a7ec94a Fix typos 2023-06-02 22:02:19 -04:00
Piotr Osiewicz 2ff93b2bc5 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 4829c9ef8e Show remaining tokens 2023-06-02 17:27:21 +02:00
Antonio Scandurra 83542684d5 Fix compile errors 2023-06-02 10:08:06 +02:00
Antonio Scandurra 58959e4179 Merge remote-tracking branch 'origin/main' into assistant-2 2023-06-02 09:32:11 +02:00
Max Brunsfeld ec0e6c8095 Fix ambiguous glob export warnings in rust 1.70 2023-06-01 14:07:59 -07:00
Max Brunsfeld ba6cd9a8a4 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 c338c69da7 Make language_settings take a language, not a language name 2023-05-31 15:10:30 -07:00
Max Brunsfeld 6f55841897 Make language settings accessors take an arc dyn file 2023-05-31 14:57:04 -07:00
Max Brunsfeld 1fbbaa262f Respect project-specific settings for copilot 2023-05-31 14:42:15 -07:00
Antonio Scandurra d987c468f8 Merge remote-tracking branch 'origin/main' into assistant-2 2023-05-30 15:11:06 +02:00
Max Brunsfeld fb4c174fd1 Start work on respecting project-specific settings 2023-05-29 14:25:49 -07:00
Antonio ScandurraandNathan Sobo 7c547a09c9 Move history navigation logic to Workspace
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-29 19:47:59 +02:00
Antonio Scandurra 4577cee4b4 Show custom header for assistant messages 2023-05-29 15:57:55 +02:00
Nathan Sobo 47cf6dc4d7 Hide assistant gutter 2023-05-26 15:38:03 -06:00
Julia a3bc3f85a9 Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
Julia ee718b9a33 Remove concept of git diff refresh from Item trait 2023-05-25 14:29:28 -04:00
JuliaandMax Brunsfeld 7331f2ce3f 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 20a6ccd521 Have proper undo for both client and host 2023-05-25 18:29:57 +03:00
Kirill BulatovandAntonio Scandurra c125d0d92b Use Transaction instead of ProjectTransaction
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-25 16:12:14 +03:00
Kirill Bulatov f5340df2fa Do not send edits over the wire 2023-05-25 12:55:44 +03:00
Kirill Bulatov bf53e1aa01 Allow to disable the new feature 2023-05-25 09:45:50 +03:00
Kirill Bulatov adaae861b6 Use formatting options 2023-05-25 09:45:50 +03:00
Kirill Bulatov 4a0dec610a Send and handle OnTypeFormatting LSP request 2023-05-25 09:45:50 +03:00
Nathan Sobo 0d72a3bec6 Merge remote-tracking branch 'origin/main' into zmd 2023-05-24 11:04:07 -06:00