[PR #127] feat: add Cursor IDE support #131

Open
opened 2026-05-06 13:13:31 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/bwya77/vscode-dark-islands/pull/127
Author: @McSon2
Created: 5/3/2026
Status: 🔄 Open

Base: mainHead: feat/cursor-support


📝 Commits (1)

  • 68250a5 feat: add Cursor IDE support

📊 Changes

5 files changed (+933 additions, -0 deletions)

View changed files

📝 README.md (+38 -0)
bootstrap-cursor.sh (+64 -0)
install-cursor.sh (+150 -0)
settings-cursor.json (+586 -0)
uninstall-cursor.sh (+95 -0)

📄 Description

Summary

Cursor is a popular VS Code fork. The current install.sh / bootstrap.sh / uninstall.sh target VS Code paths and the code CLI, so Cursor users can't use the one-liner. This PR adds a parallel install flow for Cursor without touching anything VS Code uses.

Once merged, Cursor users get the same one-line install experience:

```bash
curl -fsSL https://raw.githubusercontent.com/bwya77/vscode-dark-islands/main/bootstrap-cursor.sh | bash
```

What's added

File Purpose
install-cursor.sh Mirror of install.sh for Cursor — uses ~/.cursor/extensions/, ~/Library/Application Support/Cursor/User/ (or ~/.config/Cursor/User/ on Linux), and the cursor CLI
bootstrap-cursor.sh One-liner entry point — clones the repo and runs install-cursor.sh
uninstall-cursor.sh Mirror of uninstall.sh for Cursor paths
settings-cursor.json Identical to settings.json plus two Cursor-specific tweaks (see below)
README.md New "Cursor (VS Code fork)" subsection under Installation, plus a Cursor block under Uninstalling

The two Cursor-specific tweaks in settings-cursor.json

  1. \"custom-ui-style.webview.enable\": false — Cursor's extension detail panel renders inside a webview with a stricter Content-Security-Policy than VS Code's. Leaving the webview patch enabled triggers a CSP error and a blank panel (upstream issue).

  2. Hide the layout-toggle button — Cursor renders a "Toggle Primary Side Bar" action item at the top-left of the title bar (<a class=\"action-label codicon codicon-panel-left\" aria-label=\"Toggle Primary Side Bar (⌘B)\">). With Islands Dark's rounded sidebar corners, this button visually overlaps the rounded corner of .part.sidebar. Hiding it via:
    ```css
    .titlebar-left .action-item:has(.codicon-panel-left),
    .titlebar-left .action-item:has(.codicon-panel-left-off) {
    display: none !important;
    }
    ```
    ⌘B continues to toggle the sidebar normally.

Compatibility note in the README

Custom UI Style is officially "untested on VS Code forks" by its author, but works reliably on Cursor since v0.5.6 (see subframe7536/vscode-custom-ui-style#40). The README documents:

  • The expected "corrupt installation" warning after the first Custom UI Style: Reload
  • The fact that after every Cursor update, users need to re-run Custom UI Style: Reload to reapply the CSS injection (Cursor self-heals its workbench.html on update, undoing the patch)

Why a separate settings-cursor.json vs runtime patching

I chose to ship a complete settings file rather than have install-cursor.sh patch settings.json at install time. Reasons:

  1. Mirrors how install.sh works — a flat cp of a settings file. No new runtime logic to review.
  2. The Cursor-specific bits are clearly visible to anyone reading the file (with // Cursor-specific: ... JSON-string comments).
  3. If you ever change settings.json, regenerating settings-cursor.json is a 30-second job (cp + add the two tweaks). Happy to add a sync script or convert to a runtime-patch approach if you'd rather have a single source of truth — let me know your preference and I'll update.

Why this doesn't depend on the perf PR

I have a separate PR (#126) that adds GPU layer promotion to canvas containers, fixing editor/terminal lag. It's beneficial to all users (VS Code and Cursor), not just Cursor, so I kept it independent. This Cursor PR rebases cleanly on top of that one — settings-cursor.json will pick up the perf fix automatically once both are merged and someone regenerates the file.

Test plan

  • bash install-cursor.sh on Cursor 3.1.17 / macOS 15 — extension installed, fonts copied, settings applied, Custom UI Style reloads, theme renders
  • bash uninstall-cursor.sh restores the backed-up settings.json.pre-islands-dark
  • All shell scripts pass bash -n (syntax check) and shellcheck clean
  • settings-cursor.json is valid JSON (node -e \"JSON.parse(require('fs').readFileSync('settings-cursor.json'))\")
  • Linux test — submitter only tested on macOS. The Linux paths (~/.config/Cursor/User/) are mirrored from the existing install.sh Linux logic, but a real Linux test would be appreciated
  • PowerShell variant for Windows Cursor users — not included in this PR. Happy to add install-cursor.ps1 / bootstrap-cursor.ps1 / uninstall-cursor.ps1 in a follow-up if you'd accept it (untested by me — no Windows machine available)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bwya77/vscode-dark-islands/pull/127 **Author:** [@McSon2](https://github.com/McSon2) **Created:** 5/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/cursor-support` --- ### 📝 Commits (1) - [`68250a5`](https://github.com/bwya77/vscode-dark-islands/commit/68250a516240286a2521ca7fa73b6640403f33c3) feat: add Cursor IDE support ### 📊 Changes **5 files changed** (+933 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+38 -0) ➕ `bootstrap-cursor.sh` (+64 -0) ➕ `install-cursor.sh` (+150 -0) ➕ `settings-cursor.json` (+586 -0) ➕ `uninstall-cursor.sh` (+95 -0) </details> ### 📄 Description ## Summary [Cursor](https://cursor.com) is a popular VS Code fork. The current `install.sh` / `bootstrap.sh` / `uninstall.sh` target VS Code paths and the `code` CLI, so Cursor users can't use the one-liner. This PR adds a parallel install flow for Cursor without touching anything VS Code uses. Once merged, Cursor users get the same one-line install experience: \`\`\`bash curl -fsSL https://raw.githubusercontent.com/bwya77/vscode-dark-islands/main/bootstrap-cursor.sh | bash \`\`\` ## What's added | File | Purpose | |---|---| | `install-cursor.sh` | Mirror of `install.sh` for Cursor — uses `~/.cursor/extensions/`, `~/Library/Application Support/Cursor/User/` (or `~/.config/Cursor/User/` on Linux), and the `cursor` CLI | | `bootstrap-cursor.sh` | One-liner entry point — clones the repo and runs `install-cursor.sh` | | `uninstall-cursor.sh` | Mirror of `uninstall.sh` for Cursor paths | | `settings-cursor.json` | Identical to `settings.json` plus two Cursor-specific tweaks (see below) | | `README.md` | New "Cursor (VS Code fork)" subsection under Installation, plus a Cursor block under Uninstalling | ## The two Cursor-specific tweaks in `settings-cursor.json` 1. **`\"custom-ui-style.webview.enable\": false`** — Cursor's extension detail panel renders inside a webview with a stricter Content-Security-Policy than VS Code's. Leaving the webview patch enabled triggers a CSP error and a blank panel ([upstream issue](https://github.com/subframe7536/vscode-custom-ui-style#fail-to-render-panel)). 2. **Hide the layout-toggle button** — Cursor renders a "Toggle Primary Side Bar" action item at the top-left of the title bar (`<a class=\"action-label codicon codicon-panel-left\" aria-label=\"Toggle Primary Side Bar (⌘B)\">`). With Islands Dark's rounded sidebar corners, this button visually overlaps the rounded corner of `.part.sidebar`. Hiding it via: \`\`\`css .titlebar-left .action-item:has(.codicon-panel-left), .titlebar-left .action-item:has(.codicon-panel-left-off) { display: none !important; } \`\`\` ⌘B continues to toggle the sidebar normally. ## Compatibility note in the README Custom UI Style is officially \"untested on VS Code forks\" by its author, but works reliably on Cursor since v0.5.6 (see [subframe7536/vscode-custom-ui-style#40](https://github.com/subframe7536/vscode-custom-ui-style/issues/40)). The README documents: - The expected \"corrupt installation\" warning after the first `Custom UI Style: Reload` - The fact that **after every Cursor update**, users need to re-run `Custom UI Style: Reload` to reapply the CSS injection (Cursor self-heals its `workbench.html` on update, undoing the patch) ## Why a separate `settings-cursor.json` vs runtime patching I chose to ship a complete settings file rather than have `install-cursor.sh` patch `settings.json` at install time. Reasons: 1. Mirrors how `install.sh` works — a flat `cp` of a settings file. No new runtime logic to review. 2. The Cursor-specific bits are clearly visible to anyone reading the file (with `// Cursor-specific: ...` JSON-string comments). 3. If you ever change `settings.json`, regenerating `settings-cursor.json` is a 30-second job (`cp` + add the two tweaks). Happy to add a sync script or convert to a runtime-patch approach if you'd rather have a single source of truth — let me know your preference and I'll update. ## Why this doesn't depend on the perf PR I have a separate PR (#126) that adds GPU layer promotion to canvas containers, fixing editor/terminal lag. It's beneficial to **all** users (VS Code and Cursor), not just Cursor, so I kept it independent. This Cursor PR rebases cleanly on top of that one — `settings-cursor.json` will pick up the perf fix automatically once both are merged and someone regenerates the file. ## Test plan - [x] `bash install-cursor.sh` on Cursor 3.1.17 / macOS 15 — extension installed, fonts copied, settings applied, Custom UI Style reloads, theme renders - [x] `bash uninstall-cursor.sh` restores the backed-up `settings.json.pre-islands-dark` - [x] All shell scripts pass `bash -n` (syntax check) and `shellcheck` clean - [x] `settings-cursor.json` is valid JSON (`node -e \"JSON.parse(require('fs').readFileSync('settings-cursor.json'))\"`) - [ ] Linux test — submitter only tested on macOS. The Linux paths (`~/.config/Cursor/User/`) are mirrored from the existing `install.sh` Linux logic, but a real Linux test would be appreciated - [ ] PowerShell variant for Windows Cursor users — not included in this PR. Happy to add `install-cursor.ps1` / `bootstrap-cursor.ps1` / `uninstall-cursor.ps1` in a follow-up if you'd accept it (untested by me — no Windows machine available) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vscode-dark-islands#131
No description provided.