This guide shows how to build and install the ObjectQL VSCode extension.
- Node.js 16+ and npm
- Visual Studio Code 1.85.0 or higher
- (Optional) Red Hat YAML extension for enhanced YAML support
pnpm workspaces. Ensure you are running commands from the root or using strictly pnpm.
- Navigate to the extension directory:
cd packages/tools/vscode-objectql- Install dependencies:
pnpm install- Compile TypeScript:
pnpm run compile- Package the extension:
pnpm run packageThis creates a .vsix file (e.g., vscode-objectql-0.1.0.vsix).
To publish a new version to the VS Code Marketplace:
- Install vsce:
pnpm add -g @vscode/vsce- Login to Azure DevOps:
vsce login <publisher_id>- Publish:
# Increment version number automatically
pnpm version patch # or minor, major
# Publish
pnpm run publish- Open Visual Studio Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "Extensions: Install from VSIX..."
- Select the
vscode-objectql-0.1.0.vsixfile - Reload VS Code when prompted
code --install-extension vscode-objectql-0.1.0.vsixFor testing during development:
- Open the extension folder in VS Code:
code packages/tools/vscode-objectql- Press
F5to launch Extension Development Host - The extension runs in a new VS Code window for testing
-
Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) -
Type "ObjectQL" - you should see commands like:
- ObjectQL: New Object Definition
- ObjectQL: New Validation Rules
- etc.
-
Create a new file with
.object.ymlextension -
Start typing
oql-to see snippets
- Open Extensions panel (
Ctrl+Shift+X/Cmd+Shift+X) - Search for "ObjectQL"
- Click "Uninstall"
- Check that you have a workspace folder open
- Verify the extension is enabled in Extensions panel
- Reload VS Code:
Developer: Reload Window
- Ensure you're in a YAML file
- Check that completion is enabled:
objectql.completion.enabled - Try reloading VS Code
- Install Red Hat YAML extension:
redhat.vscode-yaml - Check settings:
objectql.validation.enabledshould betrue - Verify file pattern matches (e.g.,
*.object.yml)
- Ensure Node.js 16+ is installed
- Clear node_modules and reinstall:
rm -rf node_modules package-lock.json
npm install- Read the README for usage examples
- Check CONTRIBUTING for development guidelines
- Visit ObjectQL Documentation for protocol details