Skip to content

misc: Add Cursor IDE to Cypress recognized file editors #31691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ _Released 5/20/2025 (PENDING)_

- `@cypress/webpack-dev-server` and `@cypress/webpack-batteries-included-preprocessor` now ship with [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer) as a diagnostic tool to determine bundle statistics, which can be enabled via `DEBUG=cypress-verbose:webpack-dev-server:bundle-analyzer` ( component tests using webpack) or `DEBUG=cypress-verbose:webpack-batteries-included-preprocessor:bundle-analyzer` (e2e tests using webpack, which is the default preprocessor), respectively. Addresses [#30461](https://github.com/cypress-io/cypress/issues/30461).

**Misc:**

- Cursor is now available as an IDE option for opening files in Cypress, if it is installed on your system. Addressed in [#31691](https://github.com/cypress-io/cypress/pull/31691).

**Dependency Updates:**

- Upgraded `trash` from `5.2.0` to `7.2.0`. Addressed in [#31667](https://github.com/cypress-io/cypress/pull/31667).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const icons: Record<string, FunctionalComponent<SVGAttributes, {}>> = {
const customEditor = { id: 'custom', icon: Terminal, name: 'Custom', binary: 'custom' }

const editorOptions = computed(() => {
const editors = props.gql.localSettings.availableEditors?.map((x) => ({ ...x, icon: icons[x.id] })) || []
const editors = props.gql.localSettings.availableEditors?.map((x) => ({ ...x, icon: icons[x.id] ?? icons['custom'] })) || []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not possible to utilize a Cursor icon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find one in the icon library that we're currently using. It just doesn't seem worth the effort to track down and get in. The icons in our vue components are pretty gnarly.


editors.push(customEditor)

Expand Down
12 changes: 12 additions & 0 deletions packages/server/lib/util/env-editors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import type { Editor } from '@packages/types'

export const linuxEditors = [
{
id: 'cursor',
binary: 'cursor',
name: 'Cursor',
}, {
id: 'atom',
binary: 'atom',
name: 'Atom',
Expand Down Expand Up @@ -54,6 +58,10 @@ export const linuxEditors = [

export const macOSEditors = [
{
id: 'cursor',
binary: '/Applications/Cursor.app/Contents/MacOS/Cursor',
name: 'Cursor',
}, {
id: 'atom',
binary: 'atom',
name: 'Atom',
Expand Down Expand Up @@ -130,6 +138,10 @@ export const macOSEditors = [

export const windowsEditors = [
{
id: 'cursor',
binary: 'Cursor.exe',
name: 'Cursor',
}, {
id: 'brackets',
binary: 'Brackets.exe',
name: 'Brackets',
Expand Down
Loading