Skip to content

📦 NEW: Theme Shades of Purple #2114

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 7 commits into from
Jun 29, 2025

Conversation

ahmadawais
Copy link
Contributor

@ahmadawais ahmadawais commented Jun 27, 2025

TLDR

This PR adds the Shades of Purple theme for syntax highlighting in the Gemini CLI. The theme provides a beautiful dark purple aesthetic with vibrant color accents for enhanced code readability and visual appeal.

Dive Deeper

The Shades of Purple theme is a comprehensive syntax highlighting theme that includes:

  • Complete theme implementation: I carefully crafted syntax highlighting rules covering multiple programming languages
  • Rich color palette: Purple background with vibrant accents (green for strings, yellow for titles, pink for numbers, orange for keywords, etc.)
  • Language support: JavaScript/TypeScript, Python, Ruby, SQL, Markdown, JSON, HTML/XML and more
  • Advanced features: Line number styling, selection highlighting, diff support, and special language-specific rules

The theme follows the existing architecture pattern:

  • Extends the ColorsTheme interface with required color definitions
  • Implements the Theme class with proper TypeScript types
  • Integrates seamlessly with the existing theme manager system
  • Includes gradient colors for UI elements

Technical Implementation:

  • Added shades-of-purple.ts with complete theme definition
  • Updated theme-manager.ts to register the new theme
  • Fixed license header formatting to match project standards
  • All existing functionality remains unchanged

image
image
image

Reviewer Test Plan

To validate this change:

  1. Build and run the CLI:

    npm run build
    npm start
  2. Test theme switching:

    • Once in the CLI, use /theme command to open theme selector
    • Verify "Shades Of Purple" appears in the available themes list
    • Select the theme and confirm it applies correctly
  3. Test syntax highlighting:

    • I used a prompt like what would a diff file demo look like in a form of a patch
    • Verify that syntax highlighting uses the purple color scheme
    • Check that different code elements (strings, keywords, comments) display in appropriate colors

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Testing completed:

  • macOS + npm run: All preflight checks pass, builds successfully, tests pass
  • Unit tests: All 1057+ tests passing across CLI and core packages
  • Linting: ESLint passes with proper license header
  • Build: Compiles successfully without errors
  • Integration: Theme integrates properly with theme manager

Linked issues / bugs

No specific issues linked - this is a new feature addition bringing a popular community theme to the Gemini CLI for enhanced developer experience.


Note: I am the creator of the original popular Shades of Purple VS Code theme.

@ahmadawais ahmadawais requested a review from a team as a code owner June 27, 2025 04:53
@jacob314
Copy link
Collaborator

jacob314 commented Jun 27, 2025

We have a number of pull requests to add custom themes. Unfortunately we can't accept them all as the theme dialog will get overrun with themes. If anything we should have fewer themes then we have today. This is however a pretty compelling theme so if we can figure out an existing theme to remove, I'm open to adding this. A lot of the existing themes are similar. @miguelsolorio may have ideas about which of the existing themes we should consider removing to add this.,

This issue
#2122
tracks supporting loading custom themes. Please thumbs up if you would like that support.

@jacob314 jacob314 self-assigned this Jun 27, 2025
Copy link
Collaborator

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm

I think we actually have room for one more line in the theme dialog before it overflows the vertical height of the default so approving as this theme is more unique than most of the other themes that all look similar. Thank you for the contribution and I'm looking forward to using this theme myself.

@ahmadawais
Copy link
Contributor Author

Thank you @jacob314. Excited to get this approved. Over five million developers use Shades of Purple theme. One of the top five VS Code themes. With 150 different themes, I care deeply about how code is syntax highlighted.

Let’s get another review to speed things along. Excited to share it with purplers.

@scottdensmore scottdensmore added this pull request to the merge queue Jun 29, 2025
Merged via the queue into google-gemini:main with commit 19a9b50 Jun 29, 2025
4 checks passed
saheersk pushed a commit to saheersk/gemini-cli that referenced this pull request Jun 29, 2025
@NTaylorMullen
Copy link
Collaborator

Love this @ahmadawais !!! Also really makes me think we need to build in theming into our extension system asap 🤔

@jacob314
Copy link
Collaborator

100% agree about getting theming into our extension. Great news is that we have someone already trying to do that!
#2533
Tracking issue:
#2122

viridivn pushed a commit to viridivn/gemini-cli that referenced this pull request Jun 29, 2025
yuvrajangadsingh pushed a commit to yuvrajangadsingh/gemini-cli that referenced this pull request Jun 30, 2025
matias-casal pushed a commit to matias-casal/gemini-cli that referenced this pull request Jul 9, 2025
XCTianer pushed a commit to datanger/gemini-cli that referenced this pull request Jul 17, 2025
davenportjw pushed a commit to davenportjw/gemini-cli that referenced this pull request Jul 24, 2025
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.

4 participants