Commit Graph
100 Commits
Author SHA1 Message Date
Joseph T. Lyons 88e094c6e2 Associate additional file extensions with known languages (#2847)
Going to do these in batches.  Here is the first one.

Release Notes:

- Associated additional file extensions with known languages
(([#633](https://github.com/zed-industries/community/issues/633)),
([#1822](https://github.com/zed-industries/community/issues/1822))).
    - C++: `cxx`, `hxx`, `inl`
    - JavaScript: `cjs`
    - Python: `mpy`
    - TypeScript: `cts`, `d.cts`, `d.mts`, `mts`
2023-08-15 16:46:42 -04:00
Joseph T. Lyons d6ca0a1f24 Associate extensions with language 2023-08-15 16:33:02 -04:00
Joseph T. Lyons 230b894871 v0.100.x dev 2023-08-09 12:30:39 -04:00
Joseph T. Lyons bed0d1d529 Fix language detection when file name begins with a . (#2833)
I went to add in `zprofile` to the bash language config to get syntax
highlighting for it. After adding it in, Zed was still not highlighting
the file. I checked and saw that we are using `Path::extension()` in
`language_for_file()`, which [returns `None` when a file's name begins
with a
`.`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.extension),
such as in the case of `.zprofile`. This PR adds a custom method, with
some tests, that just tries to grab the last component in the file name
if `Path::extension` returns `None`. Not sure if `ext` is the best name,
but I can't use `extension`.

Maybe this method should be called `extension_or_hidden_file_name()`?

Release Notes:

- Fixed a bug where language detection would fail for files starting
with `.` in their names.
- Added syntax highlighting for `.zprofile` files
2023-08-08 21:48:56 -04:00
Joseph T. Lyons c523ccc4c7 Fix code that identifies language via extension 2023-08-08 21:35:11 -04:00
Joseph T. Lyons d417993c9d Add syntax highlighting for Cargo.toml files (#2830)
Release Notes:

- Added syntax highlighting for `Cargo.toml` files
2023-08-07 17:28:21 -04:00
Joseph T. Lyons dbf25ea2ff Add syntax highlighting for Cargo.toml files 2023-08-07 17:24:22 -04:00
Joseph T. Lyons 580c2ea8eb Fix test name 2023-08-07 17:07:01 -04:00
Joseph T. Lyons e3a4d174de Fix bash path_suffixes and add cmd-/ line comment support (#2827)
<img width="1608" alt="SCR-20230806-cyrg"
src="https://github.com/zed-industries/zed/assets/19867440/2491c4bc-5797-4417-9633-08c136b4e8fe">

I noticed we weren't highlghting bash files if the shebang line didn't
exist. After checking, it looks like the `.` were accidentally added to
the `path_suffixes` list. This PR fixes that and adds in support for
`cmd-/` to trigger line comments.

<img width="1608" alt="SCR-20230806-czxh"
src="https://github.com/zed-industries/zed/assets/19867440/37dd0c8e-c4e7-49e2-9997-9dd8145f460e">


Release Notes:

- Fixed a bug where shell files weren't syntax highlighted if a shebang
didn't exist.
- Added support for `cmd-/` to add line comments to shell files.
2023-08-06 02:35:00 -04:00
Joseph T. Lyons ef5b982ea5 Fix bash path_suffixes and add line_comment 2023-08-06 02:20:31 -04:00
Joseph T. Lyons 7777d973cd Expand empty selections to cover full word when doing case conversions and fix bugs (#2826)
When doing case conversions, specifically in the case of an empty
selection, in both VS Code and Sublime, the cursor winds up being in a
different place relative to where it started.

In VS Code, the cursor maintains it position in the text, no matter if
the text expands or shrinks


https://github.com/zed-industries/zed/assets/19867440/b24f5d86-c315-4a72-9ed4-3732b490ea9a

In Sublime, I have no idea what is going on:


https://github.com/zed-industries/zed/assets/19867440/05f21303-6e42-47b2-b844-7accd0bf05d7

I thought it would be a better experience if, when doing an empty
selection transformation, we simply expand the selection and park the
cursor at the end of the newly-transformed text.


https://github.com/zed-industries/zed/assets/19867440/833619ef-04e2-47b6-ad4e-e2b43d54fb2b

This feels similar to us expanding the selection when doing line
manipulations:


https://github.com/zed-industries/zed/assets/19867440/c30c5332-787d-4cf0-a9ee-e66c3c159956

Selections are adjusted to match however each word expands and shrinks,
even when there are multiple:


https://github.com/zed-industries/zed/assets/19867440/d7073aac-8a59-4f2c-b0e5-1df37be1694c

Release Notes:

- Improved behavior of empty-selection case transformations by selecting
resulting word.
- Fixed some bugs with overflow
2023-08-05 12:16:46 -04:00
Joseph T. Lyons 1abb6a0176 Expand empty selections to cover full word and fix bugs 2023-08-05 11:31:21 -04:00
Joseph T. Lyons d1048d03b0 Add more convert to case commands (#2825)
I'm using [convert_case](https://crates.io/crates/convert_case)
underneath the hood, which has over 35 million downloads and feels
solid.

Release Notes:

- Added commands to convert between variable name styles
([#1821](https://github.com/zed-industries/community/issues/1821)).
    - `convert to kebab case`
    - `convert to snake case`
    - `convert to upper camel case`
    - `convert to lower camel case`
    - `convert to title case`
2023-08-04 22:51:32 -04:00
Joseph T. Lyons 12e8f417e4 Add more convert to case commands
ConvertToTitleCase
ConvertToSnakeCase
ConvertToKebabCase
ConvertToUpperCamelCase
ConvertToLowerCamelCase
2023-08-04 22:45:26 -04:00
Joseph T. Lyons 5c2f38a0bc Add convert to {upper,lower} case commands (#2824)
Release Notes:

- Added `convert to upper case` and `convert to lower case` commands
([#1011](https://github.com/zed-industries/community/issues/1011)).
2023-08-04 18:12:55 -04:00
Joseph T. LyonsandJulia 8c98b02e45 Add convert to {upper,lower} case commands
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-04 15:10:33 -04:00
Joseph T. Lyons ee1b4a52cc Add PathExt trait (#2823)
This PR adds a `PathExt` trait. It pulls in our existing `compact()`
function, as a method, and then adds a method, and testing, for
`icon_suffix()`. A test was added to fix:

- https://github.com/zed-industries/community/issues/1877

Release Notes:

- Fixed a bug where file icons would not be registered for files with
with `.` characters in their name
([#1877](https://github.com/zed-industries/community/issues/1877)).
2023-08-03 18:57:43 -04:00
Joseph T. Lyons b0ec05a732 v0.99.x dev 2023-08-02 13:50:30 -04:00
Joseph T. Lyons eb26fb2d45 Fix variable names 2023-08-01 11:52:53 -04:00
Joseph T. Lyons 0bd6e7bac3 Fix comment 2023-07-28 23:13:36 -04:00
Joseph T. Lyons b0e81c58dc Remove unused code in test 2023-07-28 23:06:40 -04:00
Joseph T. Lyons 525c8dacbc Add a command to collapse all entires (#2813)
Release Notes:

- Added a `project panel: collapse all entries` command
([#158](https://github.com/zed-industries/community/issues/158)).
2023-07-28 22:44:08 -04:00
Joseph T. Lyons 2c47efcce9 Add a command to collapse all entires 2023-07-28 22:36:15 -04:00
Joseph T. Lyons b8690ec1d1 Update release action to choose between preview and stable URL in Discord announcements
This is what ChatGPT told me, so we'll see.
2023-07-28 15:12:37 -04:00
Joseph T. Lyons 3979454485 Follow naming convention for menu items 2023-07-27 17:13:37 -04:00
Joseph T. Lyons e3201857ce Publish preview releases to discord (#2800)
Release Notes:

- N/A
2023-07-27 15:26:08 -04:00
Joseph T. Lyons 7a9af7c663 Publish preview releases to discord 2023-07-27 15:17:13 -04:00
Joseph T. Lyons 40fcec1495 Follow naming convention for menu items 2023-07-26 14:35:23 -04:00
Joseph T. Lyons 6cd10f3d5e v0.98.x dev 2023-07-26 13:27:55 -04:00
Joseph T. Lyons cc23360bab Add sort lines command (#2786)
This PR adds command palette actions for:

- `sort lines case sensitive`
- `sort lines case insensitive`
- `reverse lines`
- `shuffle lines`

Closes out:

- https://github.com/zed-industries/community/issues/658

and partially closing out:

- https://github.com/zed-industries/community/issues/57 (which is
currently a top-ranked issue)

There are issues with dedupe lines and I didn't try to tackle converting
variable names between different conventions. I'll likely close out 57
with a note to just upvote the remaining individual issues

Release Notes:

- added command palette actions for `sort lines case sensitive`, `sort
lines case insensitive`, `reverse lines`, and`shuffle lines`
(([#57](https://github.com/zed-industries/community/issues/57)),
([#658](https://github.com/zed-industries/community/issues/658)))
2023-07-25 15:39:45 -04:00
Joseph T. Lyons 4085df5146 Add tests for manipulate_lines() 2023-07-25 15:17:16 -04:00
Joseph T. Lyons bf2ca57f55 Remove { and } from single-line closure 2023-07-25 14:48:11 -04:00
Joseph T. LyonsandMikayla Maki 93ec73da29 Fix code computing new selections
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-07-25 14:04:25 -04:00
Joseph T. LyonsandJulia 299818cde0 Fix rand import and tweak callbacks
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-07-25 11:44:13 -04:00
Joseph T. Lyons 1a84382881 WIP 2023-07-25 10:33:20 -04:00
Joseph T. Lyons bdd0b9f387 Add open file in project finder via space (#2785)
@mikayla-maki for 👀 

[This PR added in the ability to rename a file via
`enter`](https://github.com/zed-industries/zed/pull/2784). Previously,
`enter` was used to both open a file and confirm a rename, so this PR
changes the opening of a file to use `space`, which is what VS Code
uses. It also makes a bit more sense because now `enter` is just used to
start a rename and confirm the rename, vs being used for 2 different
actions.

N/A on the release notes, as I adjusted the release note in the
previously-tagged PR.

Release Notes:

- N/A
2023-07-24 16:35:01 -04:00
Joseph T. Lyons 5f89de0b80 Add key binding to close all docks (#2769)
Fixes:
https://linear.app/zed-industries/issue/Z-2680/add-a-close-all-docks-action

I frequently get stuck in this state:

<img width="1608" alt="SCR-20230721-dgvs"
src="https://github.com/zed-industries/zed/assets/19867440/13257e6d-f75a-4d1c-9718-153499e90c60">

I could zoom, but I dont want to in this case, I just want to close
everything, to get back to a truly decluttered state. Running 3 toggle
commands is cumbersome. I'd like to be able to close all docks with one
action.

I added an action with the key binding `alt-cmd-y` (similar
to`alt-cmd-t`, which is used to close all tabs). My original choice was
`alt-cmd-d` (`d` for dock), but that is the default macOS key binding to
hide the system dock.


Release Notes:

- Added a `workspace: close all docks` action (deployed via
`alt-cmd-y`).
2023-07-21 11:08:43 -04:00
Joseph T. Lyons d98fcc4402 Add key binding to close all docks 2023-07-21 02:44:44 -04:00
Joseph T. Lyons 719c56734a Reuse previously-obtained call object 2023-07-20 16:21:21 -04:00
Joseph T. Lyons 6095525b56 Add microphone toggle events (#2765)
Release Notes:

- N/A
2023-07-20 16:10:20 -04:00
Joseph T. Lyons 429daf5f8c Add microphone events to calls 2023-07-20 16:00:11 -04:00
Joseph T. Lyons 7d3d54652b Remove unused method 2023-07-20 15:54:26 -04:00
Joseph T. Lyons 7e904183bf Fix return type in watch_file_types() 2023-07-19 16:24:29 -04:00
Joseph T. Lyons 34488ca863 v0.97.x dev 2023-07-19 15:33:58 -04:00
Joseph T. Lyons 64d134a0dc Update Cargo.lock 2023-07-19 15:32:41 -04:00
Joseph T. Lyons 7cb5326ba0 Fix ZED_SERVER_URL port number
This change accidentally slipped into https://github.com/zed-industries/zed/pull/2746
2023-07-18 12:43:27 -04:00
Joseph T. Lyons e73f394604 Add is_staff to events (#2746)
Release Notes:

- N/A
2023-07-18 12:41:24 -04:00
Joseph T. Lyons 018eb06091 Add is_staff to events 2023-07-18 12:32:53 -04:00
Joseph T. Lyons 9f650dfa52 Prevent multiple submissions of the same feedback text (#2740)
Fixes:
https://linear.app/zed-industries/issue/Z-2416/improvements-to-feedback-submission

We get a lot of duplicate messages through our in-app feedback. My best
guess is that because we do not tell the user we are doing anything, and
because submission takes awhile, users are hitting the submission button
mutliple times. This PR blocks the submission code, once an initial
submission is sent. If the original submission fails, we unblock the
submission code. The submit button is disabled and enabled accordingly
as well.

Release Notes:

- N/A
2023-07-17 16:15:49 -04:00
Joseph T. LyonsandJulia ede86a686c Prevent multiple submissions of the same feedback text
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-07-17 16:10:34 -04:00
Joseph T. Lyons 4d91409bbc Require only a single click to split pane when using cmd in project panel (#2729)
Release Notes:

- N/A
2023-07-14 18:31:38 -04:00
Joseph T. Lyons c3e8ea304a Require only a single click to split pane when using cmd in project panel 2023-07-14 18:27:40 -04:00
Joseph T. Lyons c9ba4c764a Fix screen sharing panic introduced by call events (#2714)
Release Notes:

- Fixed a bug where Zed would crash when enabling screen share.
2023-07-12 16:22:42 -04:00
Joseph T. LyonsandMax Brunsfeld 6da5008f32 Fix screen sharing panic introduced by call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-12 16:12:07 -04:00
Joseph T. Lyons af9506b21d v0.96.x dev 2023-07-12 13:30:28 -04:00
Joseph T. Lyons 5012d618e6 Add call events (#2704)
Release Notes:

- N/A
2023-07-11 14:40:07 -04:00
Joseph T. LyonsandMax Brunsfeld 98a0113ac3 Add call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-11 13:58:55 -04:00
Joseph T. Lyons 52a497be21 Remove code block for GitHub release notes
Discord can directly render the Markdown now.
2023-07-08 18:03:18 -04:00
Joseph T. Lyons 6a15ae9c01 v0.95.x dev 2023-07-05 14:17:37 -04:00
Joseph T. Lyons 6042cf928c Fix bug preventing the assist command from working in certain keymaps (#2669)
Fixes: https://github.com/zed-industries/community/issues/1712

The keymaps were adding in a `"cmd-enter": "editor::NewlineBelow",`
entry in the context of `Editor`, and this was clobbering the assist
command in the assistant panel context. Zed now defines this command in
the default keymap under the context of `"context": "Editor && mode ==
full"`. All I needed to basically do was remove that command from the
keymaps. I also removed the `"cmd-shift-enter": "editor::NewlineAbove"
from the `Editor` context in those keymaps as wel, as it is also defined
in the default keymap.

Release Notes:

- Fix bug preventing the `assistant: assist` command from working in
certain keymaps
2023-06-30 13:32:42 -04:00
Joseph T. Lyons 4a654f5252 Fix bug preventing the assist command from working in certain keymaps 2023-06-30 13:27:48 -04:00
Joseph T. Lyons 6c53653831 v0.94.x dev 2023-06-28 12:23:42 -04:00
Joseph T. Lyons a09c6b2691 Add installation_id to panic events (#2642)
We want to add installation_id to the panic events so that we can easily
know if multiple panics are coming from the same person or different
people. 5 panics from one person isn't as bad as 5 panics from 5 people.

[zed.dev pr](https://github.com/zed-industries/zed.dev/pull/343)

Release Notes:

- N/A
2023-06-26 13:35:23 -04:00
Joseph T. Lyons c0fb98cb3f Factor out key name 2023-06-26 13:31:41 -04:00
Joseph T. Lyons 8d1cc8815b Merge branch 'main' into add-installation-id-to-panic-events 2023-06-26 13:27:14 -04:00
Joseph T. LyonsandJulia 7d065fa14e Add installation_id to panic events
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-06-23 21:02:01 -04:00
Joseph T. Lyons cc027dc626 v0.93.x dev 2023-06-21 13:59:07 -04:00
Joseph T. Lyons c858ab263c Add pane activation bindings for Atom keymap (#2625)
Release Notes:

- N/A
2023-06-18 02:09:26 -04:00
Joseph T. Lyons bb04d65b8e Add pane activation bindings for Atom keymap 2023-06-18 02:05:25 -04:00
Joseph Lyons 2e723cac62 v0.92.x dev 2023-06-14 13:27:36 -04:00
Joseph T. Lyons 5e68dc5c92 Fix comments in settings files (#2604)
I accidentally added the information about folder-specific settings to
the user settings default file - just fixing that.

Release Notes:

- N/A
2023-06-13 04:06:53 -04:00
Joseph Lyons 5821bc4161 Fix comments in settings files 2023-06-13 04:03:51 -04:00
Joseph T. Lyons db5bb4ec03 Do not rely on user's system time for telemetry events (#2597)
Some user's don't have their system clocks configured right and we are
seeing events 10 years into the future. I'm stripping out the code that
adds time via the client and am adding it in on zed.dev. We will lose a
little accuracy, as the time will be when the batch hits the server, but
I think its negligible (currently, batches send up every 30 seconds, at
the max) and worth it to protect our data from user's who wonkily dont
set care about their system time.

- https://github.com/zed-industries/zed.dev/pull/332

Release Notes:

- N/A
2023-06-09 18:08:11 -04:00
Joseph Lyons 0b3b732310 Do not rely on user's system time for telemetry events 2023-06-09 18:02:20 -04:00
Joseph T. Lyons d8c1ab9c68 Fix formatter comment in default settings (#2593)
Fix comment related to the `formatter` configuration option in Zed's
default settings.

Release Notes:

- N/A
2023-06-09 15:14:04 -04:00
Joseph Lyons 8882b22c9c v0.91.x dev 2023-06-07 11:57:41 -04:00
Joseph Lyons c93b6cc599 Tweak comment wording 2023-06-07 00:23:58 -04:00
Joseph Lyons 2003d3dbe4 Update initial_user_settings.json 2023-06-06 14:39:56 -04:00
Joseph T. Lyons 7fbafc8030 Remove code sending zed events to mixpanel (#2567)
Release Notes:

- N/A
2023-06-05 15:40:27 -04:00
Joseph Lyons 311074e397 Remove code sending zed events to mixpanel 2023-06-05 15:33:17 -04:00
Joseph T. Lyons 2190a27dff Stop sending editor events to mixpanel (#2566)
Release Notes:

- N/A
2023-06-05 15:15:30 -04:00
Joseph Lyons 70c5489c13 Stop sending editor events to mixpanel 2023-06-05 15:09:47 -04:00
Joseph T. Lyons 4f3165692f Move app version into panic object (#2565)
Final tweaks to clean up how we structure our panic data

Release Notes:

- N/A
2023-06-05 14:40:28 -04:00
Joseph Lyons 917d8949b7 Move app version into panic object 2023-06-05 14:17:48 -04:00
Joseph T. Lyons a89f3ed445 Fix typos (#2562)
Quite literally just ran `typos --write-changes` from
https://crates.io/crates/typos. Its pretty impressive - wonder if we
should run it on CI.

Release Notes:

- N/A
2023-06-02 22:08:45 -04:00
Joseph Lyons 7c60f636d5 Fix typos 2023-06-02 22:02:19 -04:00
Joseph T. Lyons 00265c19a0 Add additional panic information to panic events (#2555)
Adds the following to the panic event

release_channel
os_name
os_version
architecture

Merge first: https://github.com/zed-industries/zed.dev/pull/322

Release Notes:

- N/A
2023-06-02 14:30:16 -04:00
Joseph Lyons c55aee84d3 Rename field to panicked_on 2023-06-02 01:33:25 -04:00
Joseph Lyons cc055901e1 Add additional panic information to panic events 2023-06-01 23:34:39 -04:00
Joseph T. Lyons 6d24a8a763 Add panic events (#2552)
Adds a time field to support panic events.  See

https://github.com/zed-industries/zed.dev/pull/321

Release Notes:

- N/A
2023-06-01 16:47:29 -04:00
Joseph Lyons 0065f5715c Add panic events 2023-06-01 16:40:54 -04:00
Joseph Lyons efcf78cbe9 Update pull_request_template.md 2023-05-30 15:15:20 -04:00
Joseph T. Lyons e9ce85ebc0 Scrape email from feedback editor (#2543)
Add release note lines here:

N/A
2023-05-30 15:13:35 -04:00
Joseph Lyons 501f9ab2c6 Scrape email from feedback editor 2023-05-30 15:06:35 -04:00
Joseph Lyons 3f79b0c7cc Don't hardcode dates into script 2023-05-24 17:39:02 -04:00
Joseph Lyons cc3186cb4a Add script to print all prs merged between a previous date and now 2023-05-24 16:58:56 -04:00
Joseph Lyons 37d35db3d7 v0.89.x dev 2023-05-24 13:22:00 -04:00
Joseph T. Lyons e463e3b2e8 Update terminal panel tooltip (#2519)
The actions in Zed now call this the Terminal Panel and the crate is
called that as well, so I think the tooltip should be updated to use
that same name.

Release Notes:

N/A
2023-05-23 22:33:08 -04:00
Joseph Lyons e6857866d4 Update terminal panel tooltip 2023-05-23 22:23:38 -04:00
Joseph T. Lyons ba7659fa77 add toggle right and bottom dock actions (#2518)
Release Notes:

N/A
2023-05-23 13:59:45 -04:00