Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Groovy Language SupportNew to Visual Studio Code? Get it now.
Groovy Language Support

Groovy Language Support

Julien TAHON

|
303 installs
| (0) | Free
Full-featured Groovy language support for VS Code with Jenkins shared library support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Groovy Language Server and VSCode Extension

Visual Studio Marketplace Version (including pre-releases) Visual Studio Marketplace Installs codecov Test Mega-Linter License GitHub stars PRs Welcome

A Visual Studio Code extension that provides Language Server Protocol (LSP) support for Groovy and Jenkinsfile

Features

  • Code Completion: Intelligent keyword and context-aware suggestions
  • Go to Definition: Jump to the definition of classes, methods, properties, and variables
  • Document Symbols: Navigate classes, methods, and properties with the outline view
  • Diagnostics: Real-time syntax validation and error detection
  • Hover Information: Display documentation for keywords and symbols
  • Language Configuration: Auto-closing brackets, comment toggling, and proper indentation

⚠️ Note: the default syntax highlighting for Groovy files is provided by a TextMate rule embedded in VS Code, not by this extension.

Jenkins specific features

  • Syntax Highlighting: Full TextMate grammar support for Jenkinsfile

Extension Settings

Setting Description Default
groovy.jenkins.sharedLibrary.srcPath Relative path to the Jenkins shared library src directory (containing classes and methods) src
groovy.jenkins.sharedLibrary.varsPath Relative path to the Jenkins shared library vars directory (containing global functions) vars

Supported File Extensions

  • .groovy - Standard Groovy files
  • .gvy - Groovy script files
  • .gy - Groovy files
  • .gsh - Groovy shell scripts
  • Jenkinsfile, .jenkins, .pipeline - Jenkins scripts

Installation

From Source

  1. Clone or navigate to this repository

  2. Install dependencies:

    npm install
    
  3. Compile the extension:

    npm run compile
    
  4. Open VSCode and press F5 to launch the Extension Development Host

Package as VSIX

To package the extension for distribution:

npm install -g @vscode/vsce
vsce package

This creates a .vsix file that can be installed in VSCode via:

  • Extensions panel → ... menu → Install from VSIX

Development

Project Structure

groovy-vscode
├── client
│   ├── src
│   │   └── extension.ts
│   └── syntaxes
│       └── jenkinsfile.tmLanguage.json
└── server
    └── src
        ├── server.ts
        ├── test
        │   └── languageServer.test.ts
        └── utils.ts

Building

# Compile both client and server
npm run ci

# Watch mode (auto-compile on changes)
npm run watch

Debugging

  1. Open the project in VSCode
  2. Press F5 or select "Launch Client" from the debug panel
  3. A new VSCode window (Extension Development Host) will open
  4. Open or create a .groovy file to test the extension

To debug both client and server:

  • Select "Client + Server" compound configuration
  • Set breakpoints in either client/src/extension.ts or server/src/server.ts

Future Enhancements

  • Find References
  • Rename refactoring

Testing the Extension

Before publishing, test the packaged extension:

  1. Install the .vsix file locally in VS Code:

    • Open VS Code
    • Extensions panel → ... menu → Install from VSIX
    • Select the generated .vsix file
  2. Test all features with .groovy (or Jenkinsfile) files. Sample files can be found in groovy/folder

License

GPLv3

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests

Changelog

Check https://github.com/djukxe/groovy-vscode/releases

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft