Specter VSCode Extension
This VS Code extension provides PowerShell Script Analysis using Specter
Features
- Full PowerShell language support via Specter LSP
- Real-time diagnostics and code analysis
- IntelliSense and code completion
- Navigation and refactoring support
Requirements
- VS Code 1.75.0 or higher
- PowerShell language server executable (
Specter.Server.exe)
Installation
Build the extension:
pnpm install
pnpm build
Package the executable:
- The extension expects the PowerShell language server at:
dist/lspserver/Specter.Server.exe
- Ensure
Specter.Server.exe is built from the Specter project and placed in the correct location
Load the extension in VS Code:
- Open the extension folder in VS Code
- Press
F5 to open an Extension Development Host window
How It Works
The extension:
- Activates when you open PowerShell files (
.ps1, .psd1, .psm1)
- Spawns the Specter language server process with the
lsp command
- Communicates with the server via stdin/stdout
- Provides diagnostics, completions, and other LSP features
Development
- Run
pnpm build to compile the extension
- Run
pnpm watch to rebuild on file changes
- Test by pressing
F5 in VS Code to launch the Extension Development Host
Building the Language Server
The language server executable must be built separately from the Specter.Server project and placed at dist/lspserver/Specter.Server.exe.
See the Specter project for details on building the server.
| |