RIDL adds first-class editor support for .ridl files used by webrpc schemas.
- syntax highlighting tailored for RIDL declarations, annotations, metadata, fields, and enum members
- language server integration powered by
ridl-lsp - go to definition, type definition, find references, rename, hover, code lens, and document links
- commands to install
ridl-lsp(choosing Homebrew or Go when both are available) and to update it in place via whichever tool installed it
- VS Code
1.90+ - Homebrew or Go installed locally if you want the extension to install or update
ridl-lspfor you
Install RIDL from the Visual Studio Marketplace:
-
In VS Code, open the Extensions view (
Cmd+Shift+X/Ctrl+Shift+X), search for RIDL, and click Install. -
Or from the command line:
code --install-extension webrpc-io.ridl-vscode
-
Or open the Marketplace page and click Install.
Open any .ridl file. The extension uses the first ridl-lsp it finds: the
ridl.languageServer.path setting, then one on your PATH (e.g. a Homebrew
install), then $GOPATH/bin. If none is found, it can prompt to install one.
You can also manage the language server manually from the Command Palette:
RIDL: Install Language Server— installs via Homebrew orgo install; when both are available it asks which to use, otherwise it uses the one you have.RIDL: Update Language Server— updates the active binary using the tool it was installed with (brew upgradefor a Homebrew install,go installfor a$GOPATH/binone); it won't install a second copy from the other source.RIDL: Restart Language Server
If you want to build and install the latest extension from the repository without cloning it first, stream the installer directly.
macOS and Linux:
curl -fsSL https://raw.githubusercontent.com/webrpc/ridl-vscode/master/install.sh | bashWindows PowerShell:
Invoke-RestMethod https://raw.githubusercontent.com/webrpc/ridl-vscode/master/install.ps1 | Invoke-ExpressionRequirements:
gitnpm- the VS Code
codeCLI available inPATH
Both scripts clone the repo into a temporary directory, build the extension, install it into VS Code, and remove the temporary checkout when they finish.
If you prefer to run the installer from a local checkout instead:
./install.sh.\install.ps1To install from a different repo URL, set RIDL_VSCODE_REPO before running the script.
ridl.languageServer.path: absolute path to aridl-lspbinary to use instead of the managed oneridl.languageServer.importPath: Go import path used when installing or updating the managed serverridl.languageServer.promptToInstall: whether to prompt to installridl-lspwhen opening RIDL filesridl.languageServer.trace.server: trace level forwarded to the language client
The extension resolves ridl-lsp in this order:
ridl.languageServer.path, if set- the first
ridl-lspon yourPATH(e.g. a Homebrew install) $GOPATH/bin/ridl-lsp
RIDL: Update Language Server updates the resolved binary using the tool it was
installed with, so a Homebrew install is updated with brew upgrade and a
$GOPATH/bin install with go install — it never drops a second copy from the
other source. A binary that is neither (e.g. a custom ridl.languageServer.path)
is left for you to update.
cd ridl-vscode
npm install
npm testThen open ridl-vscode in VS Code and launch the extension host.
cd ridl-vscode
npm test
npm run packageThis produces a versioned .vsix file like ridl-vscode-<version>.vsix that you can install locally with:
code --install-extension ridl-vscode-<version>.vsix --forceOr run the packaged install workflow directly:
npm run install:localOnce the publisher is configured in the Visual Studio Marketplace:
cd ridl-vscode
npm test
npm run publish:vsceThe publish command uses vsce, so you will need a Marketplace personal access token configured for that environment.