promptl-lsp
v0.1.0
Published
Language Server Protocol implementation for PromptL
Readme
promptl-lsp
Language Server Protocol (LSP) implementation for PromptL.
Features
- Diagnostics - Real-time syntax and semantic error detection
- Go to Definition - Navigate to referenced prompt files
- Hover - Show information about prompt references
- Document Links - Clickable links for prompt references
Installation
npm install -g promptl-lspUsage
As a standalone server
promptl-lsp --stdioWith VS Code
The VS Code extension (promptl-vscode) bundles this LSP server automatically.
With Neovim
vim.lsp.start({
name = 'promptl',
cmd = { 'promptl-lsp', '--stdio' },
root_dir = vim.fs.dirname(vim.fs.find({ '.git' }, { upward = true })[1]),
})With other editors
Any editor with LSP support can use this server. Configure your editor to run:
promptl-lsp --stdioConfiguration
The server accepts configuration through the LSP workspace/didChangeConfiguration notification:
{
"promptl": {
"diagnostics": {
"enable": true,
"validateReferences": true
}
}
}Settings
| Setting | Type | Default | Description |
| -------------------------------- | ------- | ------- | ----------------------------------------------- |
| diagnostics.enable | boolean | true | Enable/disable diagnostics |
| diagnostics.validateReferences | boolean | true | Validate <prompt path="..."> references exist |
Development
# Build
pnpm build
# Watch mode
pnpm watch
# Type check
pnpm typecheckLicense
MIT
