Spock VSCode Theme
A perfect combination of colors and contrast with light/dark themes for vscode. Initially based on the Spock Test Framework, and extended to match other languages.
✨ Features
🎨 Dark Theme
- Background:
#2d3748
- Soft cool foreground:
#e2e8f0
- Spock block keywords (
given:, when:, then:, where:) highlighted
- Purple annotations (
@Unroll, @Shared, @Ignore, etc.)
- Clear distinction for:
- Strings
- Numbers
- Class names
- Comments
- Keywords
- Identifiers (methods, variables) remain readable and neutral
🌞 Light Theme
- Soft gray background (not pure white)
- Carefully tuned contrast
- Matching purple annotation styling
- Optimized for long coding sessions
🧪 Optimized For
- Groovy
- Java
- Spock Framework tests
- BDD-style specifications
Example:
class CalculatorSpec extends Specification {
@Unroll
def "max of #a and #b is #c"() {
given:
def calculator = new Calculator()
when:
def result = calculator.max(a, b)
then:
result == c
where:
a | b | c
1 | 3 | 3
}
}
given/when/then/where → keyword color
@Unroll → purple annotation
- Methods & variables → neutral readable foreground
- Strings & numbers → clearly distinguishable
📦 Installation
From VSIX
- Open VS Code
- Go to Extensions panel
- Click
⋯
- Select Install from VSIX
- Choose the packaged
.vsix file
- Reload VS Code
From Marketplace
- Open Extensions
- Search for Spock Docs Theme
- Click Install
- Select theme from Preferences → Color Theme
🎯 Included Themes
- Spock Docs Dark
- Spock Docs Light
Switch between them using:
Preferences → Color Theme
🎨 Color Philosophy
The palette mirrors the tone of the Spock documentation:
- Calm dark slate background
- Soft pastel syntax accents
- Minimal noise for identifiers
- Clear structural highlighting for test readability
The goal is to make Spock tests visually structured and pleasant to read.
🚀 Publishing
This extension can be packaged using:
vsce package
And published using:
vsce publish
Make sure your publisher field in package.json matches your Marketplace publisher ID.
NOTE: the vsce publish doesn't work so we need to publish it directly via the marketplace: https://marketplace.visualstudio.com/manage/publishers/cabolabshealthinformatics
📜 License
MIT (or choose your preferred license)
If you'd like, I can also generate:
- A polished marketplace description version (SEO optimized)
- A minimal GitHub repository structure
- A badge section (downloads, version, license)
- A matching logo concept description for branding
Just tell me 🙂