0390df2
Fix block cursor does not render italic for vim (#10249)
Click to expand commit body
Release Notes: - Fixed #8799
Hans created
0390df2
Fix block cursor does not render italic for vim (#10249)
Release Notes: - Fixed #8799
Hans created
cf5a113
Don't panic when multiple Zed instances are open (#10295)
This stops an annoying panic that can occur when developing Zed Release Notes: - N/A
Mikayla Maki created
7dccbd8
markdown preview: Improve live preview (#10205)
This PR contains various improvements for the markdown preview (some of which were originally part of #7601). Some improvements can be seen in the video (see also release notes down below): https://github.com/zed-industries/zed/assets/53836821/93324ee8-d366-464a-9728-981eddbfdaf7 Release Notes: - Added action to open markdown preview in the same pane - Added support for displaying channel notes in markdown preview - Added support for displaying the current active editor when opening markdown preview - Added support for scrolling the editor to the corresponding block when double clicking an element in markdown preview - Improved pane creation handling when opening markdown preview - Fixed markdown preview displaying non-markdown files
Bennet Bo Fenner created
d009d84
Add support for using a language server with multiple languages (#10293)
This PR updates the `extension.toml` to allow specifying multiple languages for a language server to work with. The `languages` field takes precedence over `language`. In the future the `language` field will be removed. As part of this, the Emmet extension has been extended with support for PHP and ERB. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
5e44748
Adjust string splitting function (#10221)
- Fixed #9729 and #10193 This commit fixes an issue where the string splitting function was handling characters in the input string improperly. We adjusted the use of the `take_while` function to calculate the length of the numeric prefix, rather than directly splitting the string, thus correctly splitting the string into a numeric prefix part and the remaining part
Hans created
d2bf80c
Make search context larger (#10289)
This increases search context from 1 above, 2 below, to 2 above and 2 below, matching the Sublime Text search results. Release Notes: - Increased search result context from 3 lines to 4 lines
Mikayla Maki created
44aed4a
Add surrounds support for vim (#9400)
For #4965 There are still some minor issues: 1. When change the surround and delete the surround, we should also decide whether there are spaces inside after deleting/replacing according to whether it is open parentheses, and replace them accordingly, but at present, delete and change, haven't done this adaptation for current pr, I'm not sure if I can fit it in the back or if it needs to be fitted together. 2. In the selection mode, pressing s plus brackets should also trigger the Add Surrounds function, but this MR has not adapted the selection mode for the time being, I think we need to support different add behaviors for the three selection modes.(Currently in select mode, s is used for Substitute) 3. For the current change surrounds, if the user does not find the bracket that needs to be matched after entering cs, but it is a valid bracket, and will wait for the second input before failing, the better practice here should be to return to normal mode if the first bracket is not found 4. I reused BracketPair in language, but two of its properties weren't used in this mr, so I'm not sure if I should create a new struct with only start and end, which would have less code I'm not sure which ones need to be changed in the first issue, and which ones can be revised in the future, and it seems that they can be solved --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Hans and Conrad Irwin created
e826ef8
Fix panic in visual line mode with folds (#10284)
Fixes: #10266 Release Notes: - Added/Fixed/Improved ... ([#<public_issue_number_if_exists>](https://github.com/zed-industries/zed/issues/<public_issue_number_if_exists>)). Optionally, include screenshots / media showcasing your addition that can be included in the release notes. **or** - N/A
Conrad Irwin created
56c0345
Respect language server's capabilities when calling `GetReferences` (#10285)
This PR makes Zed respect the language server's capabilities when calling the `GetReferences` command (used in "Find All References", etc.). This fixes a crash that could occur when using Zed with Gleam v1.0. Release Notes: - Made "Find All References" respect the language server's capabilities. This fixes some instances where certain language servers would stop working after receiving a "Find All References" request. --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
f1428fe
Make scrollbar a bit wider (#10248)
At the moment, the editor scrollbar is 12px wide. One pixel is allocated
for the left border, so we have 11 pixels to display markers. It's not
enough to make three even marker columns (git, highlights, diagnostics)
that fully fill the scrollbar, so the current implementation allocates 3
pixels to each column.
As the result, we have 2 spare pixels on the right (before #10080 they
were occupied by the diagnostics column). Making the scrollbar just one
pixel wider allows us to give one additional pixel to each marker column
and make markers more pronounced ("as is" on the left, "to be" on the
right):
<img width="115" alt="zed-scrollbar-markers-1px"
src="https://github.com/zed-industries/zed/assets/2101250/4bdf0107-c0f1-4c9c-9063-d2ff461e1c32">
Other options:
- Remove scrollbar thumb border. That'll give us one missing pixel to
make markers wide and even. I, personally, prefer this option, but
themes now have `scrollbar.thumb.border` colors that differ from
`scrollbar.thumb.background` for some reason. This theme setting becomes
deprecated in this case. For the reference: VS Code doesn't have
scrollbar slider borders, IntelliJ IDEA does have them.
- Don't try to make markers evenly wide. For instance, IntelliJ uses
very narrow git-diff markers that are separated from other markers. But
it requires much wider scrollbar (it's 20px in IDEA).
- Use the spare two pixels to make diagnostic markers wider (it's the
pre #10080 approach), or split them between the highlight and diagnostic
markers (have 3px+4px+4px marker columns).
- Do nothing. It leaves us with two unused pixels :(
Release Notes:
- N/A
Related Issues:
- The previous discussion:
https://github.com/zed-industries/zed/pull/9080#issuecomment-1997979968
Andrew Lygin created
9b88259
Fix panic in drag entered (#10277)
Co-Authored-By: Kirill <kirill@zed.dev> Release Notes: - Fixed panic when dragging into Zed. Optionally, include screenshots / media showcasing your addition that can be included in the release notes. **or** - N/A Co-authored-by: Kirill <kirill@zed.dev>
Conrad Irwin and Kirill created
4d68bf2
Fix panic when deleting just-generated text (#10282)
We ran into a panic when deleting text that was just generated by a code action. This fixes it by ensuring we don't run into a 0-minus-1 panic when a buffer_range is empty. Release Notes: - Fixed panic that could occur when deleting generated-by-unsaved text. Co-authored-by: Conrad <conrad@zed.dev>
Thorsten Ball and Conrad created
87c282d
Send along diagnostics when requesting code actions (#10281)
This fixes #10177 by sending along the correct diagnostics when querying the language server for diagnostics for a given cursor location. Turns out that `gopls` takes the `range`, `source`, `message` of the diagnostics sent along to check whether it has any code actions for the given location. Release Notes: - Fixed "quickfix" code actions that were based on diagnostics not showing up in Go files. ([#10177](https://github.com/zed-industries/zed/issues/10177)). Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Marshall <marshall@zed.dev>
Thorsten Ball , Conrad , and Marshall created
134decb
Add compatibility table between Zed and `zed_extension_api` versions (#10279)
This PR updates the README of the `zed_extension_api` crate to show the compatibility between different versions of `zed_extension_api` and Zed. Release Notes: - N/A
Marshall Bowers created
f0d4d71
pane: Always notify status bar items on Pane::Focused events (#10275)
Due to peculiarities in handling of terminal panes (namely the fact that they are not actually tracked by the Workspace::active_pane member), it was possible to get into a state where status bar items "lost track" of an active pane item; one way to reproduce it was to open a new terminal via "workspace: new terminal" with a pane open in a central view; once a new terminal is opened, the language selector and line number indicator lose track of an active item. Focusing central view does nothing - it will only go away after switching a tab in the central view. To remedy this, we now always notify the status bar items of a pane focus change, even if Workspace::active_pane points to the same pane. Release Notes: - Fixed status bar focus issues when spawning a terminal via `workspace: new terminal` action.
Piotr Osiewicz created
bcdae9f
Add settings to hide/show navigation history buttons (#10240)
This is another variant for this [original
PR](https://github.com/zed-industries/zed/pull/10091) to add settings to
show/hide navigation history buttons that puts the settings under a new
section called `tab_bar`:
```
"tab_bar": {
// Whether or not to show the navigation history buttons.
"show_nav_history_buttons": true
}
```
<img width="314" alt="Screenshot 2024-04-02 at 3 00 53 PM"
src="https://github.com/zed-industries/zed/assets/1253505/23c4fa19-5a63-4160-b3b7-1b5e976c36bf">
<img width="329" alt="Screenshot 2024-04-02 at 3 01 03 PM"
src="https://github.com/zed-industries/zed/assets/1253505/64c2ebd2-9311-4589-a4e8-bd149c6c4ece">
Mike Sun created
7aef447
chore: Remove tasks.md (#10273)
The file has been moved over to zed.dev repo and resurrected some time ago. Release Notes: - N/A
Piotr Osiewicz created
4bdfc12
Remove duplicated code for unchanged parts of different extension API versions (#10218)
Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Max Brunsfeld , Marshall , and Marshall Bowers created
4ce5b22
tasks: Add status indicator to the status bar (#10267)
Release Notes: - Added task status indicator to the status bar.
Piotr Osiewicz created
ce5bc39
Improve Ruby Syntax (#10255)
Release Notes: fixes #9995 being able to target constants <img width="336" alt="image" src="https://github.com/zed-industries/zed/assets/7274458/9e8cc438-10c4-441f-9140-3f4b418bd3bd"> Adds highlighting for parameters In blocks <img width="318" alt="image" src="https://github.com/zed-industries/zed/assets/7274458/4fa45fbe-104b-4778-994b-3b6d6ba930d4">
Ben Hamment created
4f9ad30
tasks: Use icons instead of secondary text in a modal (#10264)
Before:  After:  Release Notes: - N/A
Piotr Osiewicz created
3e6a9f6
Bump PyGithub
Joseph T. Lyons created
4944dc9
Show status of LSP actions (#9818)
Fixes #4380 Parts im still unsure about: - [x] where exactly I should call `on_lsp_start`/`on_lsp_end` - [x] how to handle things better than `let is_references = TypeId::of::<R>() == TypeId::of::<GetReferences>();`, which feels very janky - [x] I want to have the message be something like `"Finding references to [...]"` instead of just `textDocument/references`, but I'm not sure how to retrieve the name of the symbol that's being queried - [ ] I think the bulk of the runtime is occupied by `let result = language_server.request::<R::LspRequest>(lsp_params).await;`, but since `ModelContext` isn't passed into it, I'm not sure how to update progress from within that function - [x] A good way to disambiguate between multiple calls to the same lsp function; im currently using the function name itself as the unique identifier for that request, which could create issues if multiple `textDocument/references` requests are sent in parallel Any help with these would be deeply appreciated! Release Notes: - Adds a status indicator for LSP actions --------- Co-authored-by: Mikayla <mikayla@zed.dev>
Daniel Zhu and Mikayla created
c7961b9
Implement ObjectFit::ScaleDown for images (#10063)
While working towards fixes for the image viewer, @mikayla-maki and I discovered that we didn't have `object-fit: scale-down` implemented. This doesn't _fully_ solve the image issues as there is some issue where only the bounds width is updating on layout change that I haven't fully chased down. Co-Authored-By: @mikayla-maki Release Notes: - N/A --------- Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Kyle Kelley and Mikayla Maki created
c64c275
Fix reference to `soft_wrap` option in comment (#10239)
Brought this up briefly in Discord: https://discord.com/channels/869392257814519848/873293828805771284/1226224505760776192 Release Notes: - Fixed an incorrect reference to the `soft_wrap` setting in the default settings documentation.
Andrew Dunbar created
0325bda
Improve lsp notifications (#10220)
1. They now will not go off-screen 2. You can scroll long messages. 3. Only one notification per language server is shown at a time 4. The title/text are now distinguished visually 5. You can copy the error message to the clipboard Fixes: #10217 Fixes: #10190 Fixes: #10090 Release Notes: - Fixed language server notifications being too large ([#10090](https://github.com/zed-industries/zed/issues/10090)).
Conrad Irwin created
3aa242e
Disable format on save for C and C++ (#10141)
We want Zed to be opinionated and low-configuration. Your code editor should get out of the way, and just do the right thing. However, some ecosystems aren't opinionated enough for us to automatically detect the right way to format your code, so let's turn it off. Release Notes: - Disabled `format_on_save` by default in C and C++.
Mikayla Maki created
518cfdb
Adjust env parsing to account for multiline env values (#10216)
fixes https://github.com/zed-industries/zed/issues/6012 Release Notes: - N/A
Mikayla Maki created
bf9b443
vim: Support gn command and remap gn to gl (#9982)
Release Notes: - Resolves #4273 @algora-pbc /claim #4273 This is a work-in-progress. The process for `gn` command is: - maintain updated vim.workspace_state.search.initial_query - modify editor.select_next_state with vim.workspace_state.search.initial_query - use editor.select_next() - merge selections - set editor.select_next_state to previous state To make this possible, several private members and editor structures are made public. `gN` is not yet implemented and the cursor still does not jump to the next selection in the first use. Maybe there is an better way to do this? --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
joaquin30 and Conrad Irwin created
fe4b345
Fix interpretation of \n in hovers (#10214)
I ran into this specifically when looking at the documentation of https://crates.io/crates/wayland-client Release Notes: - Fixed a bug where some hover popovers would render `\n` instead of a new line.
Mikayla Maki created
7b636d9
Limit the extension tasks in the modal to current language only (#10207)
Release Notes: - N/A
Kirill Bulatov created
c851e6e
Add `language_server_workspace_configuration` to extension API (#10212)
This PR adds the ability for extensions to implement `language_server_workspace_configuration` to provide workspace configuration to the language server. We've used the Dart extension as a motivating example for this, pulling it out into an extension in the process. Release Notes: - Removed built-in support for Dart, in favor of making it available as an extension. The Dart extension will be suggested for download when you open a `.dart` file. --------- Co-authored-by: Max <max@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Marshall Bowers , Max , and Max Brunsfeld created
4aaf345
Improve extension API documentation (#10210)
This PR adds more documentation for various constructs in the `zed_extension_api` crate. `wit_bindgen` is able to generate doc comments on the Rust constructs using the the doc comments in the WIT files, so we're able to leverage that for the majority of the constructs that we expose. Release Notes: - N/A
Marshall Bowers created
b05aa38
Handle old versions of `/usr/bin/env` when loading shell env (#10202)
This fixes #9786 by using an invocation of `/usr/bin/env` that's supported by macOS 12. As it turns out, on macOS 12 (and maybe 13?) `/usr/bin/env` doesn't support the `-0` flag. In our case it would silently fail, since we `exit 0` in our shell invocation and because the program we run and whose exit code we check is the `$SHELL` and not `/usr/bin/env`. What this change does is to drop the `-0` and instead split the environment on `\n`. This works even if an environment variable contains a newline character because that would then be escaped. Release Notes: - Fixed Zed not picking up shell environments correctly when running on macOS 12. ([#9786](https://github.com/zed-industries/zed/issues/9786)). Co-authored-by: Dave Smith <davesmithsemail@gmail.com>
Thorsten Ball and Dave Smith created
ec6efe2
Fix crash when joining two consecutive lines (#10000)
Release notes: - Fixed a crash when joining two consecutive lines ([#9692](https://github.com/zed-industries/zed/pull/9692)). This crash is not caused by `vim` or `editor`'s code logic, `join_line` logic is okay, I found that the crash is caused by a refresh of git `diff` after every update, hhen git diff generates hunks, it will look for the cursor to the beginning of a line, and judge that if the cursor result column is greater than 0, that is, it is not the beginning of a line, it will correct the row to the next line, I think before we forgot here that I need to adjust the column to 0 at the same time, otherwise it is easy to go out of bounds, I am not sure if I need to add more tests for this method, I can add if I need to, but I feel that this case is a bit extreme --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Hans and Thorsten Ball created
6c45bc2
Bump Python version in actions
Joseph T. Lyons created
83364c7
Bump setup-python version
Joseph T. Lyons created
4cab4e8
Fix flag name
Joseph T. Lyons created
1737329
Use existence of issue_reference_number flag to determine if prod
Joseph T. Lyons created
3ae6463
Fix scrollbar markers in large files (#10181)
#10080 introduced a minor change in how the min marker height is enforced. Before the change, it was applied to the aggregated marker, but after the change it's applied to each individual marker before aggregation. The difference is not noticeable on small files, where even single row markers are higher than `MIN_MARKER_HEIGHT`, but it leads to visible differences in large files with repeating blocks of highlighted and not-highlighted blocks, like in [this case](https://github.com/zed-industries/zed/pull/9080#issuecomment-2006796376). This PR fixes how the `MIN_MARKER_HEIGHT` is applied. Before the fix: <img width="727" alt="zed-scroll-markers-before" src="https://github.com/zed-industries/zed/assets/2101250/a1c34746-af4f-4054-8de2-edabf3db7cee"> After the fix: <img width="736" alt="zed-scroll-markers-after" src="https://github.com/zed-industries/zed/assets/2101250/b9ee843d-055e-42a6-af26-e7fd4f7729f8"> Release Notes: - N/A /cc @mrnugget
Andrew Lygin created
773a3e8
Don't require an issue number while in dev mode
Joseph T. Lyons created
cedbfac
Fix typo (#10183)
Release Notes: - N/A
Drazen created
73d8a43
vim: Allow `:` in empty panes and screen shares (#10171)
Release Notes: - vim: Fixed `:` when no files are open
Conrad Irwin created
4a32561
Add `label_for_symbol` to extension API (#10179)
This PR adds `label_for_symbol` to the extension API. As a motivating example, we implemented `label_for_symbol` for the Haskell extension. Release Notes: - N/A Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
5d88d9c
markdown preview: Add link tooltips (#10161)
Adds tooltips to the markdown preview, similar to how its done for `RichText` https://github.com/zed-industries/zed/assets/53836821/523519d4-e392-46ef-9fe0-6692871b317d Release Notes: - Added tooltips when hovering over links inside the markdown preview
Bennet Bo Fenner created
dde87f6
markdown preview: Auto detect raw links (#10162)
Similar to the work done in `rich_text`, raw links now get picked up in the markdown preview. https://github.com/zed-industries/zed/assets/53836821/3c5173fd-cf8b-4819-ad7f-3127c158acaa Release Notes: - Added support for detecting and highlighting links in markdown preview
Bennet Bo Fenner created
d306b53
Add `label_for_completion` to extension API (#10175)
This PR adds the ability for extensions to implement `label_for_completion` to customize completions coming back from the language server. We've used the Gleam extension as a motivating example, adding `label_for_completion` support to it. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Marshall Bowers , Max , and Max Brunsfeld created
0f1c2e6
Return back the ability to save non-dirty singleton buffers (#10174)
Kirill Bulatov created
0861cea
Add `yield` keyword highlight for Rust (#10104)
Release Notes: - Added `yield` keyword highlight for Rust Ref: - https://github.com/rust-lang/rust-analyzer/pull/7209 - https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting/highlight.rs#L177 - https://doc.rust-lang.org/reference/keywords.html?highlight=yield#reserved-keywords In VS Code:  docs.rs: https://docs.rs/async-stream/latest/async_stream/macro.try_stream.html  ## Before <img width="644" alt="image" src="https://github.com/zed-industries/zed/assets/5518/da349187-57e6-4cea-b3e3-f628ce6a99e8"> ## After update in Zed 
Jason Lee created
1c485a0
tasks: change placeholder text in a modal (#10166)
Related to: #10132 Release Notes: - N/A
Piotr Osiewicz created