From 885857987667ef82e2a502c56869fcebbbc03845 Mon Sep 17 00:00:00 2001 From: Anjana Supun Date: Mon, 29 Dec 2025 18:58:51 +0530 Subject: [PATCH] Add Ballerina LSP implementation --- .claude-plugin/marketplace.json | 34 ++++++++++++++++++++++++ plugins/ballerina-lsp/README.md | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 plugins/ballerina-lsp/README.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index c11e6442..b4c5d1ed 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -228,6 +228,40 @@ } } }, + { + "name": "ballerina-lsp", + "description": "Ballerina language server for code intelligence and cloud-native development", + "version": "1.0.0", + "author": { + "name": "WSO2", + "email": "contact@ballerina.io" + }, + "source": "./plugins/ballerina-lsp", + "homepage": "https://ballerina.io", + "repository": "https://github.com/ballerina-platform/ballerina-lang", + "category": "development", + "strict": false, + "lspServers": { + "ballerina": { + "command": "bal", + "args": ["start-language-server"], + "extensionToLanguage": { + ".bal": "ballerina" + }, + "initializationOptions": { + "enableSemanticHighlighting": false, + "enableBackgroundDriftCheck": false, + "enableInlayHints": false, + "supportBalaScheme": false, + "supportQuickPick": true, + "supportPositionalRenamePopup": true, + "enableLightWeightMode": false, + "enableIndexPackages": true, + "enableMemoryUsageMonitor": false + } + } + } + }, { "name": "agent-sdk-dev", "description": "Development kit for working with the Claude Agent SDK", diff --git a/plugins/ballerina-lsp/README.md b/plugins/ballerina-lsp/README.md new file mode 100644 index 00000000..8c43aec4 --- /dev/null +++ b/plugins/ballerina-lsp/README.md @@ -0,0 +1,47 @@ +# ballerina-lsp + +Ballerina language server for Claude Code, providing code intelligence features like go-to-definition, find references, diagnostics, and type information. + +## Supported Extensions +`.bal` + +## Prerequisites + +This plugin requires the Ballerina language distribution to be installed on your machine. + +**Minimum Requirements:** +- Ballerina >= 2201.12.0 (Swan Lake Update 12 or later) +- The `bal` command must be available in your system PATH +- Java 21 (bundled with Ballerina distribution) + +## Installation + +### Install Ballerina + +1. Download and install Ballerina from [https://ballerina.io/downloads/](https://ballerina.io/downloads/) +2. Follow the installation instructions for your platform (macOS, Linux, or Windows) +3. Verify the installation: + ```bash + bal version + ``` + +You should see output similar to: +``` +Ballerina 2201.13.1 (Swan Lake Update 13) +Language specification 2024R1 +Update Tool 1.5.1 +``` + +**Verify Installation:** +```bash +# Check Ballerina is in PATH +bal version + +# Check Ballerina home +bal home +``` + +## More Information +- [Ballerina Official Website](https://ballerina.io) +- [Ballerina Language Server Repository](https://github.com/ballerina-platform/ballerina-lang) +- [Ballerina Documentation](https://ballerina.io/learn/)