Commit Graph

815 Commits

Author SHA1 Message Date
Nate Butler
eeaa1e5cf9 Add github icon 2023-12-18 12:56:57 -05:00
Joseph T. Lyons
e792286660 Add contributing guide 2023-12-14 15:54:31 -05:00
Kirill Bulatov
27d6432c84 Rework the way project panel auto reveals entries
* gitignored entries are never auto revealed
* `project_panel::auto_reveal_entries = true` settings entry was added,
setting it to `false` will disable the auto reveal
* `pane::RevealInProjectPanel` action was added that activates the project panel and reveals the entry it got triggered on (including the gitignored ones)
2023-12-12 11:38:51 +02:00
Marshall Bowers
8987b2205c
Fix line endings in Palenight source themes (#3554)
This PR fixes the line endings in the Palenight source themes.

Release Notes:

- N/A
2023-12-08 12:04:24 -05:00
Marshall Bowers
52e4c577d2 Re-import Rosé Pine source themes 2023-12-08 11:45:08 -05:00
Marshall Bowers
7a9f764aa0
Add support for theme family-specific syntax mapping overrides (#3551)
This PR adds support for adding a specific set of mappings from Zed
syntax tokens to VS Code scopes for a particular theme family.

We can use this as a fallback when we aren't otherwise able to rely on
the mappings in the theme importer, as sometimes it isn't possible to
make a specific enough matcher that works across all of the themes.

Release Notes:

- N/A
2023-12-07 23:37:49 -05:00
Max Brunsfeld
489c25ac6a Put ToggleZoom key binding back into the block with no context 2023-12-06 11:32:05 -08:00
Nathan Sobo
65bb05af4c Merge main
Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-05 16:47:13 -07:00
Nathan Sobo
379ba620b2 Move workspace bindings to workspace context
Without this, hitting cmd-n on the context menu in the project browser
invokes the workspace::NewFile action instead of the project::NewFile
action. We're considering changing the behavior so that bindings with no
context can only invoke global actions.

Co-Authored-By: Max <max@zed.dev>
2023-12-01 15:59:40 -07:00
Nate Butler
89aa6a3726 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Joseph T. Lyons
1a1451a943 Fix bug preventing spaces from being used in filename 2023-11-29 22:04:41 -05:00
Nate Butler
f33cd3d463 Merge branch 'main' into refine-keybindings 2023-11-28 14:00:09 -05:00
Nate Butler
6d6aa3b253 Update default ui font settings 2023-11-21 10:43:18 -05:00
Nate Butler
176a68f90f kb 2023-11-20 10:46:23 -05:00
Nate Butler
101fe7fbb5 Update diagnostic status bar tool 2023-11-18 00:54:01 -05:00
Kirill Bulatov
8180938401 Fix most of the TODOs 2023-11-17 21:40:57 +02:00
Kirill Bulatov
30fefa0ef8 Use a better name 2023-11-17 21:40:57 +02:00
Kirill Bulatov
26f7e66b49 Add default scan excluded files settings 2023-11-17 21:40:56 +02:00
Nate Butler
08dddf0b26 Revert change to default buffer font size 2023-11-16 13:13:03 -05:00
Nate Butler
b2f9c454b0 Change the default buffer font size to 16
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-16 11:38:04 -05:00
Nate Butler
c71e522b4e Allow users to set UI font properties in their settings
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-16 11:37:46 -05:00
Joseph T. Lyons
516a8790b9 Add gpt-4-1106-preview model 2023-11-14 08:28:57 -05:00
Joseph T. Lyons
be8bd437cd Update jetbrains keymap to match community repo 2023-11-13 10:41:56 -05:00
Kirill Bulatov
d38a2b793e Do not add diagnostics for any selection in the diagnostics panel 2023-11-10 13:35:58 +02:00
Marshall Bowers
6bc1cf0fae
Re-import the Synthwave 84 theme (#3297)
This PR re-imports the Synthwave 84 theme now that we support 3-value
hex colors.

Release Notes:

- N/A
2023-11-09 18:56:42 -05:00
Nate Butler
2347576fb5
Extend theme converter to allow multimatching against vscode colors (#3294)
[[PR Description]]

Adds the ability to specify a vec of VScode syntax scopes to match
against for a given syntax style.

Example:

```rust
pub fn to_vscode(&self) -> Vec<&'static str> {
        use ZedSyntaxToken::*;

        match self {
            SyntaxAttribute => vec!["entity.other.attribute-name"],
            SyntaxBoolean => vec!["constant.language"],
            SyntaxComment => vec!["comment"],
            SyntaxCommentDoc => vec!["comment.block.documentation"],
            SyntaxConstant => vec!["constant.character"],
            SyntaxConstructor => vec!["entity.name.function.definition.special.constructor"],
            SyntaxEmbedded => vec!["meta.embedded"],
            SyntaxEmphasis => vec!["markup.italic"],
            SyntaxEmphasisStrong => vec![
                "markup.bold",
                "markup.italic markup.bold",
                "markup.bold markup.italic",
            ],
            SyntaxEnum => vec!["support.type.enum"],
            SyntaxFunction => vec![
                "entity.name.function",
                "variable.function",
                "support.function",
            ],
            SyntaxKeyword => vec!["keyword"],
            SyntaxLabel => vec![
                "label",
                "entity.name",
                "entity.name.import",
                "entity.name.package",
            ],
            // .. more styles
}}
```

Useful `settings.json` for testing themes:

```json5
{
  // --- Dark Themes ---
  "theme": "Ayu Dark"
  // "theme": "Ayu Mirage"
  // "theme": "Dracula"
  // "theme": "Gruvbox Dark Hard"
  // "theme": "Gruvbox Dark Medium"
  // "theme": "Gruvbox Dark Soft"
  // "theme": "Night Owl"
  // "theme": "Noctis Obscuro"
  // "theme": "Noctis"
  // "theme": "Nord"
  // "theme": "Palenight (Mild Contrast)"
  // "theme": "Palenight Operator"
  // "theme": "Palenight"
  // "theme": "Rose Pine Moon"
  // "theme": "Rose Pine"
  // "theme": "Solarized Dark"
  // "theme": "Synthwave 84"
  // --- Light Themes ---
  // "theme": "Ayu Light"
  // "theme": "Gruvbox Light Hard"
  // "theme": "Gruvbox Light Medium"
  // "theme": "Gruvbox Light Soft"
  // "theme": "Noctis Lux"
  // "theme": "Rose Pine Dawn"
  // "theme": "Solarized Light"
}
```

Release Notes:

- N/A
2023-11-09 17:40:10 -05:00
Max Brunsfeld
b6eef26f91 Merge branch 'main' into search-query-suggestion-fixes 2023-11-09 14:18:17 -08:00
Max Brunsfeld
6b8ce3cc85 Add a setting for when to seed the search query from the text under the cursor 2023-11-09 14:03:14 -08:00
Nate Butler
6b65acaa99 regenerate themes, format 2023-11-09 16:48:35 -05:00
Nate Butler
00b298a50c Fix incorrect Rose Pine Dawn theme name 2023-11-09 16:44:40 -05:00
Nate Butler
4cd37e6e62 Extend theme converter to allow multimatching against vscode colors 2023-11-09 16:38:48 -05:00
Nate Butler
54157eb99a Finish passing Syntax from VSCode themes to Zed Themes
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-09 14:41:26 -05:00
Nate Butler
3cb72610b3 Finish up initial themes 2023-11-06 15:24:36 -05:00
Nate Butler
c47c64184c Add additional themes, update theme importer 2023-11-06 14:54:21 -05:00
Nate Butler
3940e02a73 Add Nord Theme 2023-11-06 13:25:27 -05:00
Nate Butler
80f80df5cf Add Noctis Theme 2023-11-06 12:43:10 -05:00
Marshall Bowers
f8504c349c Merge branch 'main' into import-theme 2023-11-06 12:08:46 -05:00
Nate Butler
230edeb5f8 Add gruvbox source theme, strip comments 2023-11-06 11:16:09 -05:00
Nate Butler
b9d8e08165 Add Andromeda source theme 2023-11-06 10:57:15 -05:00
Nate Butler
1bce5dcc69 Add checkboxes and their stories 2023-11-05 01:06:41 -05:00
Marshall Bowers
0bc51382b2 Add basic VsCodeThemeConverter 2023-11-02 18:24:38 -04:00
Marshall Bowers
e48332c81f Parse VSCode theme files 2023-11-02 18:00:55 -04:00
Nate Butler
058981350c Scaffold out new theme-importer crate
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-02 17:21:11 -04:00
Nate Butler
58ac7f2926 [Broken] Load a src theme in test 2023-11-02 16:26:27 -04:00
Nate Butler
8dafd5f1f3 Allow ListHeader to take a meta 2023-11-01 12:43:25 -04:00
Max Brunsfeld
cc9e92857b
Guest roles (#3140)
Release Notes:

- Added a "guest" role to channels, and made that the default when a new
user joins a public channel.
2023-10-24 17:29:14 +02:00
Nate Butler
c9e670397f Give notifications a bit more breathing room by default 2023-10-24 09:25:49 -04:00
Conrad Irwin
67e590202a
vim surround (#3152)
- Fix some bugs with vim objects
- Add | as a bracket and a motion
- Fix neovim tests with angle brackets

Release Notes:

- vim: Fixed `i` and `a` objects with softwrap, and a few other edge
cases
- vim: Added support for `ci"` to find the next quoted string on the
line
- vim: Added support for `|` as a bracket (for languages like ruby and
rust)
- vim: Added support for `<count>|` to jump to a specific column
2023-10-24 01:33:34 -06:00
Conrad Irwin
ea4e67fb76 Merge branch 'main' into guest-exp 2023-10-23 17:47:21 +02:00
Conrad Irwin
3cf98c4fae Add | as a bracket and a motion
Although vim/nvim doesn't have | as brackets, it's common in langauges like Rust
and Ruby, and I expect it to work.
2023-10-22 22:17:34 -06:00
Conrad Irwin
0eff7c6ca9 Add read-only channel notes support
Fix some bugs where ChannelNotes and ChannelChat had old cached channel
instances
2023-10-19 13:20:49 -06:00
Max Brunsfeld
b07f9fe3b5 Merge branch 'main' into notifications 2023-10-18 17:20:04 -07:00
Conrad Irwin
cc390ba862
Start writing role to database (#3120)
Scaffolding for guest members in channels

Release notes:
- You can now set channels to "public" which will allow anyone to join
and become a member. In a future release guests joining public channels
will have reduced permissions.
2023-10-17 13:40:58 -06:00
Conrad Irwin
1c5e07f4a2 update sidebar for public channels 2023-10-17 13:30:09 -06:00
Nate Butler
8db389313b Add link & public icons 2023-10-17 13:34:51 -04:00
Nate Butler
247728b723 Update indexing icon
Co-Authored-By: Kyle Caverly <22121886+KCaverly@users.noreply.github.com>
2023-10-16 15:53:29 -04:00
Nate Butler
39e3ddb080 Update bell.svg 2023-10-13 15:00:32 -04:00
Max Brunsfeld
e590b43545 Merge branch 'main' into notifications 2023-10-13 11:31:53 -07:00
Julia
2323fd17b0
Autocomplete docs (#3126)
Release Notes:

- Added documentation display for autocomplete items.
- Fixed autocomplete filtering blocking the Zed UI, causing hitches and
input delays with large completion lists.
- Fixed hover popup link not firing if the mouse moved a slight amount
while clicking.
- Added support for absolute path file links in hover popup and
autocomplete docs.
2023-10-13 13:26:45 -04:00
Julia
ec4391b88e Add setting to disable completion docs 2023-10-12 22:08:47 -04:00
Max Brunsfeld
d1756b621f Start work on notification panel 2023-10-12 17:41:09 -07:00
Kirill Bulatov
6ec3927dd3 Allow to configure default prettier 2023-10-11 12:56:29 +03:00
Kirill Bulatov
12ea12e4e7 Make language adapters able to require certain bundled formatters 2023-10-11 12:56:29 +03:00
Kirill Bulatov
4f956d71e2 Slightly better prettier settings and discovery 2023-10-11 12:56:29 +03:00
Kirill Bulatov
a8dfa01362 Prepare prettier file lookup code infra 2023-10-11 12:56:28 +03:00
Conrad Irwin
1de9add304 vim: Add shift-y 2023-10-10 18:46:49 -06:00
Conrad Irwin
f6bc229d1d More progress and some debug logs to remove 2023-10-06 16:48:29 -06:00
Joseph T. Lyons
e5e63ed201 Add Nushell support to venv activation 2023-10-01 23:38:30 -04:00
Mikayla
752bc5dcdd
Refactor elixir LSP settings 2023-09-29 14:12:50 -07:00
Antonio Scandurra
4dd9c9e2b9
Introduce the ability to include or exclude warnings from project diagnostics (#3056)
![CleanShot 2023-09-27 at 18 09
37](https://github.com/zed-industries/zed/assets/482957/317d31e4-81f8-44d8-b94f-8ca7150d3fd2)

Release Notes:

- Added the ability to exclude warnings from project diagnostics. By
default, they will be on but they can be disabled temporarily by
clicking on the warnings icon. The default behavior can be changed by
changing the new `diagnostics.include_warnings` setting.
2023-09-29 13:13:04 +01:00
Conrad Irwin
91adefedfa
vim keybinding updates (#3057)
Release Notes:

- vim: Add ctrl-i to go forward
([#1732](https://github.com/zed-industries/community/issues/1732)).
ctrl-o was already supported.
- vim: Add `g <space>` to open the current snippet in its own file.
- vim: Escape will now return to normal mode even if completion menus
are open (use `ctrl-x ctrl-z` to hide menus, as in vim).
- vim: Add key bindings for Zed's various completion mechanisms:
- - `ctrl-x ctrl-o` to open the completion menu,
- -  `ctrl-x ctrl-l` to open the LSP action menu,
- - `ctrl-x ctrl-c` to trigger Copilot (requires configuring copilot),
- - `ctrl-x ctrl-a` to trigger the inline Assistant (requires
configuring openAI),

NOTE: we should add these to the docs before shipping 0.107 to stable.
2023-09-28 15:32:21 -06:00
Conrad Irwin
2f5eaa8475
vim increment (#3054)
- vim: add ctrl-a/ctrl-x for increment/decrement
2023-09-28 15:32:11 -06:00
Joseph T. Lyons
f965ee9b1b Enable semantic_index by default 2023-09-28 17:17:26 -04:00
Piotr Osiewicz
81a107f503
assets: Add keybinds to replace (#3055)
Release Notes:

- N/A
2023-09-28 13:04:14 +02:00
Conrad Irwin
51b24bbaf3 Add vim-style completion bindings: 2023-09-27 21:29:18 -06:00
Conrad Irwin
2cb320e246 Escape returns to normal mode even if completion is open
For zed-industries/community#1746
2023-09-27 21:28:30 -06:00
Conrad Irwin
73fc1c1c56 Add g space for option-enter
vimify all the things
2023-09-27 21:05:58 -06:00
Conrad Irwin
d1baff1743 Add ctrl-i to go forward
For zed-industries/community#1732
2023-09-27 21:04:13 -06:00
Conrad Irwin
dd1cf5c3cf vim: add ctrl-a/ctrl-x
For zed-industries/community#1411
For zed-industries/community#619
2023-09-27 19:49:31 -06:00
Antonio Scandurra
78908bc5cb Introduce a new include_warnings setting under diagnostics 2023-09-27 18:08:08 -06:00
Conrad Irwin
25429f760c ctrl-a/x for vim 2023-09-27 12:32:01 -06:00
Conrad Irwin
37b6e1cbb7 Add SwapPaneInDirection
Add keybindings for vim (and non-vim)
2023-09-26 22:00:51 -06:00
Piotr Osiewicz
36f022bb58
project_replace: Fix up key bindings (#3034)
Release Notes:
- N/A
2023-09-26 18:40:41 +02:00
Conrad Irwin
42df5ef45e
vim: Add multicursor shortcuts (#3032)
Adding a few bindings to bring first class feeling multiselect to zed's
vim emulation.

gn and gN are similar to similar vim bindings, ga is similar to gA (and
I doubt we need vim's real ga), g> and g< are just made up.

Release Notes:

- vim: `g n` / `g N` to select next/previous
- vim: `g >` / `g <` to skip current selection and select next/previous
- vim: `g a` to select all
2023-09-25 17:18:12 -05:00
Conrad Irwin
b29e295e1b vim: Add multicursor shortcuts
- g n / g N to select next/previous
- g > / g < to select next/previous replacing current
- g a to select all matches
2023-09-25 15:32:03 -06:00
Mikayla Maki
8c90157990
Fix space and copy/paste when editing a channel (#3030)
This fixes several bugs with how spaces and keyboard commands interact
with channel creating / renaming.

fixes
https://github.com/zed-industries/community/discussions/2076#discussioncomment-7096959

Release Notes:

- N/A
2023-09-25 15:20:00 -05:00
Conrad Irwin
b454f43b6c
Add cmd-+ as an alias for cmd-= (#3028)
Release Notes:

- Allow cmd-+ in addition to cmd-= for zoom in
([#1021](https://github.com/zed-industries/community/issues/1021)).

Although I had initially thought this was something more to do with
option key handling, it turns out to be a straightforward and reasonable
feature request.
2023-09-25 14:45:46 -05:00
Conrad Irwin
d17d38fe70
vim: Command (#2951)
Release Notes:

- vim: Add v1 of command mode
([#279](https://github.com/zed-industries/community/issues/279)). The
goal was to cover 90% of what most people actually do, but it is very
incomplete. Known omissions are that ranges cannot be specified (except
that `:%s//` must always specify the % range), commands cannot take
arguments (you can `:w` but not `:w [file]`), and there is no history.
Please file feature requests on
https://github.com/zed-industries/community as you notice things that
could be better.
- `:` triggers zed's command palette. If you type a known vim command it
will run it, otherwise you get zed's normal fuzzy search. For this
release supported commands are limited to:
- - `:w[rite][!]`, `:wq[!]`, `:q[uit][!]`, `:wa[ll][!]`, `:wqa[ll][!]`,
`:qa[ll][!]`, `:[e]x[it][!]`, `:up[date]` to save/close tab(s) and
pane(s).
- - `:cq` to quit completely.
- - `:vs[plit]`, `:sp[lit]` to split vertically/horizontally
- - `:new`, `:vne[w]` to create a new file in a new pane above or to the
left
- - `:tabedit`, `:tabnew` to create a new file in a new tab.
- - `:tabn[ext]`, `:tabp[rev]` to go to previous/next tabs
- - `:tabc[lose]` to close tabs
- - `:cn[ext]`, `:cp[rev]`, `:ln[ext]`, `:lp[rev]` to go to the
next/prev diagnostics.
- - `:cc`, `:ll` to open the errors page
- - `:<number>` to jump to a line number.
- - `:$` to jump to end of file
- - `:%s/foo/bar/` (note that /g is always implied, the range must
always be %, and zed uses different regex syntax to vim)
- - `:/foo` and `:?foo` to jump to next/prev line matching foo
- - `:j[oin]`, to join the current line (no range is yet supported)
- - `:d[elete][l][p]`, to delete the current line (no range is yet
supported)
- - `:s[ort] [i]` to sort the current selection (case-insensitively)
- vim: Add `ctrl-w o` (closes everything except the current item) and
`ctrl-w n` (creates a new file in the pane above).
([#1884](https://github.com/zed-industries/community/issues/1884))
- all: Add a "Discard" option to prompt when saving a file with
conflicts (previously this only appeared on close, not on save).

Internal changes:
- The Picker will now wait for pending queries before confirming (to
handle people typing `: w enter` rapidly.
- workspace::save_item and Pane::save_item are now merged together, and
the behavior controlled by `workspace::SaveIntent`.
- Many actions related to closing/saving items now take an optional
`SaveIntent`.
-
2023-09-25 14:07:22 -05:00
Mikayla
667fc25766
Fix space and copy/paste when editing a channel 2023-09-25 11:31:02 -07:00
Mikayla Maki
591ec02cea
Add support for the experimental Next LS for Elixir (#3024)
This is a PR I built for a friend of a friend at StrangeLoop, who is
making a much better LSP for elixir that elixir folks want to experiment
with. This PR also improves the our debug log viewer to handle LSP
restarts.

TODO:
- [ ] Make sure NextLS binary loading works.

Release Notes:

- Added support for the experimental Next LS for Elxir, to enable it add
the following field to your settings to enable:

```json
"elixir": {
    "next": "on"
}
```
2023-09-25 12:52:56 -05:00
Conrad Irwin
23767f734f Add cmd-+ as an alias for cmd-=
For github.com/zed-industries/community#1021
2023-09-25 11:31:34 -06:00
Mikayla
052cb459a6
Improve lsp log viewer's behavior in the presence of LSP restarts
Improve settings interface to local LSP
2023-09-24 04:59:55 -07:00
Conrad Irwin
32f8733313 Code review changes 2023-09-20 21:29:45 -06:00
Conrad Irwin
6ad1f19a21 Add NewFileInDirection 2023-09-20 20:44:26 -06:00
Conrad Irwin
ea3a1745f5 Add vim-specific interactions to command
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
2023-09-20 20:44:26 -06:00
Mikayla
58f4efb579
fix default keybindings for select all matches 2023-09-20 17:14:19 -07:00
Conrad Irwin
f4d4a2f41b
vim fixes for find&replace (#2995)
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext (in vim mode)

Release Notes:

- allow replacement to be empty
2023-09-20 16:42:39 -06:00
Nate Butler
f7696114bb
Add an initial set of GPUI2 components to the storybook (#2990)
This PR adds an initial set of components to `crates/storybook/src/ui`.

All changes still are contained to inside storybook. Merging to keep up
to date with main.
2023-09-20 13:52:47 -04:00
Kyle Caverly
5fe8aa064f
Keyboard navigation and setting persistence for project search (#2996)
Enable keyboard shortcuts for Project Search modes, and ensure project
search settings are persisted search to search.

Release Notes:

- Added alt-cmd-s to Toggle Semantic Search Mode
- Added alt-cmd-g to Toggle Regex Search Mode
- Added alt-cmd-x to Toggle Text Search Mode
- Defaulted new project searches to using last used search mode and
settings.
2023-09-20 12:44:30 -04:00
KCaverly
37a0c6615f remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00