Commit Graph

1168 Commits

Author SHA1 Message Date
Conrad Irwin
09b216cf5e
Make project search feel better (#14674)
Release Notes:

- Improved UX of project search

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-07-17 14:14:46 -06:00
Nemo
ff85f1d608
Fix default sublime tab navigation (#14427)
Co-authored-by: Peter Tripp <peter@zed.dev>
2024-07-17 10:07:46 -04:00
Peter Tripp
d1300b7a66
Linux Keybinding Improvements (#14600)
- Fixed ctrl-shift-d (duplicate line) conflict.
- Fixes #14458
- Remove some duplicated definitions
- Fix Expand/Shrink selection (was ctrl-shift-up/down, now alt-shift-left/right)
- Add `ctrl-f2` / `cmd-f2` as alias for `editor::SelectAllMatches` matching VSCode
- Moved multi-cursor (Insert cursor above / below) from ctrl-shift-up/down to alt-shift-up/down
2024-07-17 10:06:47 -04:00
Conrad Irwin
2cdfae9ce3
Show an initial empty keymap (#14609)
Release Notes:

- Added default content for the user keymap file.
2024-07-16 20:24:13 -06:00
Marshall Bowers
696591ca55
php: Add Phpactor support (#14604)
This PR extends the PHP extension with
[Phpactor](https://github.com/phpactor/phpactor) support.

Phpactor seems to provide a better feature set out-of-the-box for free,
so it has been made the default PHP language server.

Thank you to @xtrasmal for informing us of Phpactor's existence!

Release Notes:

- N/A
2024-07-16 18:39:13 -04:00
Conrad Irwin
76594ae5cd
vim: fix escape while waiting (#14595)
Follow up from #14233

Release Notes:

- N/A
2024-07-16 14:08:05 -06:00
Peter Tripp
0bf0152b74
Fix GoForward shortcut on non-US keyboard layouts (#14570)
- Fixes #14418. Originally broken by #13946
2024-07-16 11:00:15 -04:00
Kirill Bulatov
bf7e474bbc Properly fix the tab icons 2024-07-16 14:46:16 +03:00
Kirill Bulatov
2a8cee57c9
Keep initial tab config without the icons (#14553)
Based on
https://zed-industries.slack.com/archives/C04S5TU0RSN/p1721125498461089

Release Notes:
- N/A
2024-07-16 13:43:17 +03:00
Conrad Irwin
abc5abcd8b
open picker (#14524)
Release Notes:

- linux: Added a fallback Open picker for when XDG is not working
- Added a new setting `use_system_path_prompts` (default true) that can
be disabled to use Zed's builtin keyboard-driven prompts.

---------

Co-authored-by: Max <max@zed.dev>
2024-07-15 17:04:15 -06:00
Marshall Bowers
1818fef32f
Display file icons in tabs (#14523)
This PR adds support for displaying file icons in tabs.

The `tabs.file_icons` setting controls whether the icons are displayed:

```json
{
  "tabs": {
    "file_icons": false
  }
}
```

This setting defaults to `true`.

<img width="1566" alt="Screenshot 2024-07-15 at 6 17 26 PM"
src="https://github.com/user-attachments/assets/86dfc8c9-764c-453d-95e4-2ec95d6fe715">

<img width="1566" alt="Screenshot 2024-07-15 at 6 24 26 PM"
src="https://github.com/user-attachments/assets/4b4e8489-49d3-41bf-b4cb-59365bdd3e9d">

Release Notes:

- Added file icons to buffer tabs
([#12138](https://github.com/zed-industries/zed/issues/12138)).
- If desired, these icons can be removed using `"tabs": { "file_icons":
false }`.
2024-07-15 18:33:08 -04:00
Eric Skogen
2c6cb4ec16
Fix Cmd+\ for workspace::ToggleLeftDock for Atom base keymap (#14098)
Release Notes:

- Fixed Left Dock in Atom keymap on Mac/Linux (`cmd-\`, `ctrl-\`) 
 ([#14098](https://github.com/zed-industries/zed/pull/14098), thanks [@audionerd](https://github.com/audionerd)).

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-07-15 15:56:10 -04:00
Nate Butler
fa3d29087d
Add REPL dropdown menu to toolbar (#14493)
TODO: 


- [x] Actions run from menu not firing
- [x] Menu differentiates idle and busy for running kernel

Menu States:
- [x] No session && no support known

No session && no kernel installed for languages of known support
- (TODO after) Intro to REPL
- [x] Link to docs

No session but can start one
- [x] Start REPL
- (TODO after) More info -> Docs?

Yes Session

- [x] Info: Kernel name, language
  example: chatlab-3.7-adsf87fsa (Python)
  example: condapy-3.7 (Python)
- [x] Change Kernel -> https://zed.dev/docs/repl#change-kernel
- ---
- [x] Run
- [x] Interrupt
- [x] Clear Outputs
- ---
- [x] Shutdown


(Release notes left empty as the change will be documented in the REPL
release!)

Reserved for a follow on PR:

```
- [ ] Status should update when the menu is open (missing `cx.notify`?)
- [ ] Shutdown all kernels action
- [ ] Restart action
- [ ] [Default kernel changed - restart (this kernel) to apply] // todo!(kyle): need some kind of state thing that says if this has happened
```


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-07-15 11:55:49 -07:00
Peter Tripp
3c38be59b5
Add keyboard shortcuts to center scrolling around current line (#14385)
- MacOS: Center the cursor in the visible area. `ctrl-l` (matches MacOS)
- Linux JetBrains: Scroll so cursor is at the Middle `ctrl-m`
- `editor::NextScreen` is not longer bound in any keymap by default (was
`ctrl-l` on MacOS)

Fixes #5247
2024-07-15 09:26:53 -04:00
Kirill Bulatov
59ce3535d3
Turn off use_on_type_format too, for languages that have format_on_save disabled (#14413)
Based on the discussion in
https://github.com/zed-industries/zed/issues/14400


Release Notes:

- N/A
2024-07-13 22:04:15 +03:00
Mikayla Maki
fe3fe945a9
linux: Indicate when the window is focused (#14266)
fixes #14202

Release Notes:

- Added a representation of the current focus state to Zed's window
style ([#14202](https://github.com/zed-industries/zed/issues/14202))
2024-07-12 14:20:58 -07:00
Stanislav Alekseev
59bc027750
Fix direnv option being named direnv and not load_direnv in the docs (#14309)
This is a quick followup to #13902 that fixes a mistake with the setting
naming in the docs, I accidentally made
Release Notes:

- N/A
2024-07-12 14:12:02 -07:00
Stanislav Alekseev
8abc000553
Fix nushell local env detection by using direnv export (#13902)
I don't intend fully on getting this merged, this is just an experiment
on using `direnv` directly without relying on shell-specific behaviours.
It works though, so this finally closes #8633
Release Notes:

- Fixed nushell not picking up `direnv` environments by directly
interfacing with it using `direnv export`

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-07-12 10:29:32 +02:00
sherwyn
e402d7e96a
vim: Add support for vim::PreviousLineStart motion (#14193)
Release Notes:

- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`


Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.


https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-11 16:36:07 -06:00
Conrad Irwin
b0dbc80575
vim: (BREAKING) clean up keymap contexts (#14233)
Release Notes:

- vim: (BREAKING) Improved vim keymap contexts.

Previously `vim_mode == normal` was true even when operators were
pending, which led to bugs like #13789 and a requirement for custom
keymaps to exclude various conditions like (`!VimObject` and
`!VimWaiting`) to avoid bugs.

Now `vim_mode` will be set to `operator` or `waiting` in these cases as
described in [the docs](https://zed.dev/docs/vim#keybindings). For most
custom keymaps this change will be a no-op or an improvement, but if you
were deliberately relying on the old behaviour (if you were relying on
`VimObject` or `VimWaiting` becoming true) you will need to update your
keymap.

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-07-11 13:16:26 -06:00
Peter Tripp
1d7b28c658
Add Upper/LowerCase binds to Linux Sublime Text keybinds (#14155) 2024-07-11 11:15:49 -04:00
Peter Tripp
de78eb44b1
Keymap changes for editor::JoinLines (#14136)
- Linux (default) add ctrl-shift-j
- Linux (default) remove ctrl-j
  - Conflicted with: `"ctrl-j": "workspace::ToggleBottomDock",`
- MacOS (sublime) add cmd-shift-j
2024-07-11 11:14:25 -04:00
tomoikey
291d64c803
lsp: Implement textDocument/signatureHelp for ProjectClientState::Local environment (#12909)
Closes https://github.com/zed-industries/zed/issues/5155
Closes https://github.com/zed-industries/zed/issues/4879


# Purpose
There was no way to know what to put in function signatures or struct
fields other than hovering at the moment. Therefore, it was necessary to
implement LSP's `textDocument/signatureHelp`.

I tried my best to match the surrounding coding style, but since this is
my first contribution, I believe there are various aspects that may be
lacking. I would greatly appreciate your code review.

# Description
When the window is displayed, the current argument or field at the
cursor's position is automatically bolded. If the cursor moves and there
is nothing to display, the window closes automatically.
To minimize changes and reduce the burden of review and debugging, the
SignatureHelp feature is implemented only when `is_local` is `true`.
Some `unimplemented!()` macros are embedded, but rest assured that they
are not called in this implementation.

# How to try it out
Press `cmd + i` (MacOS), `ctrl + i` (Linux).

# Enable auto signature help (2 ways)
### Add `"auto_signature_help": true` to `settings.json`
<img width="426" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/61310c39-47f9-4586-94b0-ae519dc3b37c">

Or

### Press `Auto Signature Help`. (Default `false`)
<img width="226" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/34155215-1eb5-4621-b09b-55df2f1ab6a8">

# Disable to show signature help after completion
### Add `"show_signature_help_after_completion": false` to
`settings.json`
<img width="438" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/5e5bacac-62e0-4921-9243-17e1e72d5eb6">

# Movie

https://github.com/zed-industries/zed/assets/55743826/77c12d51-b0a5-415d-8901-f93ef92098e7

# Screen Shot
<img width="628" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/3ebcf4b6-2b94-4dea-97f9-ac4f33e0291e">

<img width="637" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/6dc3eb4d-beee-460b-8dbe-d6eec6379b76">

Release Notes:

- Show function signature popovers
([4879](https://github.com/zed-industries/zed/issues/4879),
[5155](https://github.com/zed-industries/zed/issues/5155))

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-07-11 13:38:33 +03:00
Aaron Cunnington
ba11e9a9a8
Fix SystemUIFont typo in default settings (#14158)
Release Notes:

- N/A
2024-07-11 11:20:38 +03:00
Hans
3b823d4a0b
Add simple support for wrapscan (#13497)
For: #13417 

This is a simple version, I'm not sure if we just need to limit this
feature to vim mode, or maybe in normal editor mode, which involves
other logic like the location of the setting

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-10 20:42:37 -06:00
Ephram
15b8790a2c
Update One Light modified color (#12143)
Release Notes:

- Changed the `modified` color on the one-light color theme to a more
readable value

The current color in the file tree for modified files is basically
unreadable in the default light mode
<img width="238" alt="image"
src="https://github.com/zed-industries/zed/assets/50590465/e553673f-1c24-41d9-b1b9-1dbbb7419d1e">

This change just changes the color to match that of the one-light theme
present in vscode
~~old proposal:
https://github.com/zed-industries/zed/assets/50590465/b4dc4030-bcd8-429a-84b8-2744e213e492~~
new proposal:
<img width="378" alt="image"
src="https://github.com/zed-industries/zed/assets/50590465/41c53019-8cf3-4927-9879-47937388cde8">

This does have a side-effect of changing the modified color on the side
in the editor, but personally I think this change is negligable.
2024-07-10 15:33:35 -04:00
Kyle Kelley
07dc4050bf
Do not bind cmd-enter for repl::Run when in AssistantContext (#14066)
Don't pollute cmd-enter in the Assistant's `ContextEditor`.

Release Notes:

- N/A
2024-07-10 09:25:07 -07:00
Kyle Kelley
896b9bda23
Stick REPL icon in quick action bar (#14064)
REPL Quick Actions

<img width="325" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/faaf4c8f-ef12-4417-a9dd-158d5beae8ba">

When the Jupyter REPL is enabled and a kernel is available, show the
status in the editor bar:

![quick action bar
repl](https://github.com/zed-industries/zed/assets/836375/f3445283-f1fc-4714-895b-7aa842d4ab76)


Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-07-10 09:20:52 -07:00
Thorsten Ball
7ef64fe6db
vim: Add ctrl-m binding (equivalent to <CR>) (#14057)
Now that we have macros I noticed how much I rely on this.

Release Notes:

- vim: `ctrl-m` now is equivalent to `enter` in editor.
2024-07-10 16:31:54 +02:00
Saurabh
ba7d5a3d4c
Fixed keymap for toggling right dock in linux (#14041)
Release Notes:

- N/A
2024-07-10 10:49:28 +02:00
Aleksei Gusev
5e1521eded
Change the default shortcut for git blame on Linux (#13637)
Zed already has a shortcut assigned to ctrl-alt-g and it's mapped to
`search::SelectNextMatch`. Having another multi shortcut with the same
prefix makes `ctrl-alt-g` to have a very noticeable delay when pressed.

This commit changes the default shortcut for git blame to `alt-g b`

Release Notes:

- N/A
2024-07-09 12:13:20 -07:00
francesco-gaglione
2dd486733b
Reveal in files instead of Finder (#13432)
fixes: #12776 

Release Notes:

- Renamed `editor::RevealInFinder` to `editor::RevealInFileManager`

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-07-09 11:54:14 -07:00
Peter Tripp
9a523ef730
Fix keybind conflicts (atom mac/linux default) (#13988)
- atom(mac): Cmd+j conflicts with `workspace: ToggleBottomDock` in
default map. Revert.
- default(linux): `ctrl-shift-t` conflict. Move
`project_symbols::Toggle` to `ctrl-t` to match vscode linux. Leave
`pane::ReopenClosedItem` at `ctrl-shift-t` to match vscode/chrome on
linux.
- Fixes #13973
2024-07-09 10:02:21 -04:00
Kirill Bulatov
9b688655a8
Add a way to filter items in the outline panel (#13984)
https://github.com/zed-industries/zed/assets/2690773/145a7cf2-332c-46c9-ab2f-42a77504f54f

Adds a way to filter entries in the outline panel, by showing all
entries (even if their parents were collapsed) that fuzzy match a given
query.

Release Notes:

- Added a way to filter items in the outline panel
2024-07-09 16:44:24 +03:00
Aleksei Gusev
18d6be250f
Add keyboard shortcuts for the prompts on Linux (#13915)
This change adds ability to choose any action from prompts, not just the
default one and cancel as Zed has right now. For example, when a user
tries to close a file with edits in it the prompt offers "Don't save"
option that can be selected only with mouse. Now you can use arrows,
tab/shift-tab to pick action and enter/space to confirm it.

Fixes [#13906](https://github.com/zed-industries/zed/issues/13906)


Release Notes:

- Added keyboard navigation in the prompts on Linux
([#13906](https://github.com/zed-industries/zed/issues/13906)).


Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-07-09 10:50:13 +02:00
Matt Fellenz
034d905435
Allow vim counts with undo and redo (#13950)
These were previously passed directly to the editor module, which knows
nothing about vim counts. Instead, implement new actions in the vim
module which take the count and use it to invoke the corresponding
action in the editor module, properly repeated.

Release Notes:

- Fixed vim undo and redo commands not taking counts.
2024-07-08 23:16:52 -06:00
Conrad Irwin
0d7bd0c535
vim: Disable default ctrl-x/ctrl-w on linux (#13966)
Release Notes:

- N/A
2024-07-08 22:36:21 -06:00
Nate Butler
414cff5c14
One Dark Updates (#13777)
Before | After

![CleanShot 2024-07-03 at 10 25
24@2x](https://github.com/zed-industries/zed/assets/1714999/7b355217-7dcf-416a-8b6f-63a12d3f2ea7)

Release Notes:

- Improved contrast between some items in the One Dark theme.
2024-07-08 18:01:51 -04:00
Peter Tripp
af697d9cc2
Better tooltips for back/forward (#13946)
Fixes #8459
2024-07-08 16:33:41 -04:00
Mikayla Maki
032b203519
Separate out macOS and Linux keymaps (#13792)
Release Notes:

- Added Linux-Specific keymaps for JetBrains, Atom and Sublime Text
- Improved MacOS-specific keymaps for JetBrains and Atom
- Improved Linux default keymap (VSCode compatibility)
- Windows now uses same keymap as Linux

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-07-08 15:05:29 -04:00
Vince
79f3646325
Add missing clipboard shortcut to default-linux.json (#13900)
Bind shift-delete to editor::Cut (similar to #11799, which added copy
and paste, but not cut)


Release Notes:

- N/A
2024-07-07 14:40:23 +03:00
Peter Tripp
813cc3f5e5
Keymap oneliners (#13887)
This is should be a no-op, whitespace formatting only.
Removes 425 lines of excess whitespace in our default keymap json files.

Release Notes:

- Improved formatting of default keymaps (single line per bind)
2024-07-05 22:00:18 -04:00
Marshall Bowers
c190ed49da
Treat flake.lock files as JSON (#13886)
This PR updates the default settings to treat Nix's `flake.lock` files
as JSON.

Resolves https://github.com/zed-extensions/nix/issues/2.

Release Notes:

- Nix's `flake.lock` files are now automatically identified as JSON.
2024-07-05 17:17:27 -04:00
Kyle Kelley
1c1fd6aaa1
Finely scope repl events for runs and output clearing (#13872)
Sets up the `cmd-enter` keybinding for the jupyter repl to only apply
when enabled.

Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-07-05 13:38:44 -07:00
Kirill Bulatov
a53b3b6b10
Explicitly specify php files' formatter for prettier (#13883)
Closes https://github.com/zed-industries/zed/issues/13878

Seems that all regular files types are being recognized by Prettier from
their paths, but the PHP one does not despite the PHP plugin used when
formatting.


Release Notes:

- Fixed PHP prettier formatting, by including `php` parser name into
formatting queries
([13878](https://github.com/zed-industries/zed/issues/13878))
2024-07-05 21:52:47 +03:00
Peter Tripp
2f05f5bc5c
Make initial settings valid JSON (#13785) 2024-07-03 12:25:25 -04:00
Xiaoguang Wang
48763d0663
vim: Add vim bindings for outline panel (#13763)
Release Notes:

- vim: Add vim bindings for outline panel #13763
2024-07-03 09:23:52 -06:00
Conrad Irwin
3348c3ab4c
vim: Support for q and @ (#13761)
Fixes: #1504

Release Notes:

- vim: Support for macros (`q` and `@`) to record and replay (#1506,
#4448)
2024-07-03 09:03:39 -06:00
Peter Tripp
351a3c0815
docs: Improve default settings comments (#13749)
- Add the phrase "compact folders" to `auto_fold_dirs` to enhance
searchability.
- Fix `buffer_line_height` copy pasta

Release Notes:

- N/A
2024-07-03 08:05:40 -04:00
Nate Butler
7db68547fa
Update Platform Controls (#13751)
Continuing from #13597, this PR refactors platform controls to extract a
generic set of platform controls that can be used for any platform that
does not define it's own/we don't use the system ones.

In the future, these controls will likely be used as a fallback on
windows as well when the windows icon font isn't available.

Release Notes:

- Added updated window controls on Linux
2024-07-02 16:15:59 -04:00