GitHub Actions Custom Highlight Extension
A VS Code extension that provides custom syntax highlighting for GitHub Actions YAML files with separate colors for different keywords.
Features
- Different colors for
run: and uses: keywords
- Custom highlighting for all GitHub Actions keywords
- Configurable colors through VS Code settings
- Proper syntax highlighting for GitHub Actions workflows
Color Scheme
run: keyword: Red (#FF6B6B ) - Bold
uses: keyword: Teal (#4ECDC4 ) - Bold
name: keyword: Orange (#FF9D00 ) - Bold
- Run commands: Yellow (
#FFE66D ) - Italic
- Action references: Light Blue (
#79B8FF )
- Section headers (
jobs: , steps: , on: ): Pink (#F97583 ) - Bold
Installation
Method 1: Install from VSIX (Recommended)
Build the extension:
chmod +x github-actions-highlight/install.sh
cd github-actions-highlight
npm install -g vsce
npm install
npm run compile
npx vsce package
Install the generated .vsix file:
code --install-extension github-actions-custom-highlight-1.0.0.vsix
Method 2: Development Installation
- Clone or copy this extension to your VS Code extensions directory
- Open VS Code
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Run "Developer: Reload Window"
Configuration
You can customize the colors in your VS Code settings:
{
"githubActionsCustomHighlight.runKeywordColor": "#FF6B6B",
"githubActionsCustomHighlight.usesKeywordColor": "#4ECDC4",
"githubActionsCustomHighlight.nameKeywordColor": "#FF9D00",
"githubActionsCustomHighlight.runCommandColor": "#FFE66D",
"githubActionsCustomHighlight.actionReferenceColor": "#79B8FF"
}
Usage
The extension automatically activates when you open GitHub Actions workflow files (.yml or .yaml files in .github/workflows/ directory).
Supported Keywords
run: - Red highlighting
uses: - Teal highlighting
name: - Orange highlighting
with: - Blue highlighting
if: - Purple highlighting
env: - Green highlighting
working-directory: - Cyan highlighting
shell: - Magenta highlighting
runs-on: - Yellow highlighting
jobs: , steps: , on: - Pink highlighting
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature )
- Commit your changes (
git commit -m 'Add some amazing feature' )
- Push to the branch (
git push origin feature/amazing-feature )
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
1.0.0
- Initial release
- Custom syntax highlighting for GitHub Actions
- Separate colors for
run: and uses: keywords
- Configurable color scheme
- Support for all major GitHub Actions keywords
| |