Skip to content
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

feat(cursor): Add Cursor IDE module #290

Merged
merged 8 commits into from
Sep 20, 2024
Merged

feat(cursor): Add Cursor IDE module #290

merged 8 commits into from
Sep 20, 2024

Conversation

matifali
Copy link
Member

@matifali matifali commented Sep 19, 2024

This PR introduces the Cursor IDE module, allowing users to add
a one-click button for launching Cursor IDE into their workspaces.

  • Adds a comprehensive README for setting up the module.
  • Includes example configurations for typical usage scenarios.
  • Provides automated tests to ensure module reliability.

commit generetaed by aicommit

This commit introduces the Cursor IDE module, allowing users to add
a one-click button for launching Cursor IDE into their workspaces.
The module is designed to work with Terraform, making it
straightforward to manage and configure through infrastructure as code.

- Adds a comprehensive README for setting up the module.
- Includes example configurations for typical usage scenarios.
- Provides automated tests to ensure module reliability.
- Defines Terraform resources and variables to handle essential
  configurations like agent ID, folder locations, and order in the UI.
@matifali matifali self-assigned this Sep 19, 2024
@matifali matifali requested a review from stirby September 19, 2024 18:05
Copy link
Member Author

@matifali matifali left a comment

Choose a reason for hiding this comment

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

to test please add the follwing snippet to your template

module "cursor" {
  source    = "git::https://github.com/coder/modules.git//cursor?ref=cursor"
  agent_id = coder_agent.example.id 
}

@stirby
Copy link
Contributor

stirby commented Sep 19, 2024

Using this in my workspace, on the first attempt my healthy workspace returned a 404, offered to retry. Second attempt retires the connection many times before failing again.

Icon still shows VSCode.

@stirby
Copy link
Contributor

stirby commented Sep 19, 2024

Screenshot 2024-09-19 at 2 05 44 PM

cursor/main.tf Outdated
resource "coder_app" "cursor" {
agent_id = var.agent_id
external = true
icon = "/icon/code.svg"
Copy link
Contributor

Choose a reason for hiding this comment

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

Code 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.

This also needs adding the icon to coder/coder

Copy link
Member Author

Choose a reason for hiding this comment

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


# Cursor IDE

Add a button to open any workspace with a single click in Cursor IDE.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Requires the local Coder VSCode extension. You can import this extension into Cursor."

Copy link
Member Author

Choose a reason for hiding this comment

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

For me it auto prompts to install the extension if not installed already (Similar to VS Code).
image

@matifali matifali requested a review from stirby September 19, 2024 19:26
@matifali
Copy link
Member Author

Using this in my workspace, on the first attempt my healthy workspace returned a 404, offered to retry. Second attempt retires the connection many times before failing again.

I am unable to reproduce both of these behaviours with and without the coderpremote extension pre installed.

@stirby
Copy link
Contributor

stirby commented Sep 20, 2024

Works fine now on both MacOS and Windows, maybe it was an issue with my local cursor.

Copy link
Contributor

@stirby stirby left a comment

Choose a reason for hiding this comment

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

❤️

@matifali matifali merged commit 120a0e3 into main Sep 20, 2024
2 checks passed
@matifali matifali deleted the cursor branch September 20, 2024 15:20
@matifali matifali linked an issue Sep 23, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Cursor.sh as an IDE Option in Coder
2 participants