WDL language support for Neovim via the Sprocket LSP
Request Feature
ยท
Report Bug
sprocket.nvim provides comprehensive WDL (Workflow Description Language) support for Neovim, powered by the Sprocket language server. WDL is widely used in bioinformatics for defining portable, reproducible analysis workflows.
- LSP Integration. Completions, diagnostics, hover documentation, go-to-definition, and references powered by Sprocket
- Syntax Highlighting. Full support for WDL 1.0 through 1.3 via Vim regex patterns
- Document Formatting. Format WDL files on save or on demand via LSP or CLI
- Commands. Validate, lint, and format files directly from Neovim
- Statusline Component. Display LSP status in your statusline (lualine, etc.)
- Plugin Integrations. Works with
nvim-autopairsfor auto-closing<<</>>>and~{/}pairs, andComment.nvimfor#comments
- Neovim 0.11+
- sprocket binary
lazy.nvim (recommended)
{
"stjude-rust-labs/sprocket.nvim",
ft = "wdl",
opts = {},
}packer.nvim
use {
"stjude-rust-labs/sprocket.nvim",
ft = "wdl",
config = function()
require("sprocket").setup({})
end,
}vim-plug
Plug 'stjude-rust-labs/sprocket.nvim'
" In your init.lua or after/plugin:
lua require("sprocket").setup({})Download the latest release from GitHub Releases and ensure sprocket is in your PATH.
# Example for macOS/Linux
curl -LO https://github.com/stjude-rust-labs/sprocket/releases/latest/download/sprocket-<version>-<platform>.tar.gz
tar -xzf sprocket-*.tar.gz
mv sprocket ~/.local/bin/Alternatively, enable auto_install in the plugin configuration to download automatically.
All options with their defaults:
require("sprocket").setup({
binary = {
path = nil, -- Custom path to sprocket binary
auto_install = false, -- Auto-download from GitHub if not found
check_updates = false, -- Check for updates on startup
},
server = {
lint = false, -- Enable additional linting via `--lint` flag
log_level = "quiet", -- "quiet" | "info" | "verbose"
},
format_on_save = false, -- Auto-format WDL files before saving
status = {
enabled = true, -- Enable statusline component
icons = {
ok = "๓ฐก",
warning = "",
error = "",
loading = "๓ฐฎ",
},
},
lsp = {
capabilities = nil, -- Custom LSP capabilities (auto-detects cmp-nvim-lsp)
on_attach = nil, -- Callback when LSP attaches to buffer
handlers = nil, -- Custom LSP handlers (merged with defaults)
},
}){
"stjude-rust-labs/sprocket.nvim",
ft = "wdl",
opts = {
lsp = {
on_attach = function(client, bufnr)
local map = function(mode, lhs, rhs, desc)
vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = desc })
end
-- Navigation
map("n", "gd", vim.lsp.buf.definition, "Go to definition")
map("n", "gr", vim.lsp.buf.references, "Find references")
map("n", "gI", vim.lsp.buf.implementation, "Go to implementation")
map("n", "K", vim.lsp.buf.hover, "Hover documentation")
-- Actions
map("n", "<leader>rn", vim.lsp.buf.rename, "Rename symbol")
map("n", "<leader>ca", vim.lsp.buf.code_action, "Code action")
map("n", "<leader>f", function()
vim.lsp.buf.format({ async = true })
end, "Format buffer")
-- Diagnostics
map("n", "[d", vim.diagnostic.goto_prev, "Previous diagnostic")
map("n", "]d", vim.diagnostic.goto_next, "Next diagnostic")
map("n", "<leader>e", vim.diagnostic.open_float, "Show diagnostic")
end,
},
},
}All commands use the :Sprocket prefix:
| Command | Description |
|---|---|
:Sprocket info |
Show version, binary path, and server status |
:Sprocket restart |
Restart the LSP server |
:Sprocket stop |
Stop the LSP server |
:Sprocket version |
Display installed sprocket version |
:Sprocket update |
Download and install the latest sprocket version |
:Sprocket check [path] |
Validate a WDL file (defaults to current buffer) |
:Sprocket lint [path] |
Run linter on a WDL file |
:Sprocket format [path] |
Format a WDL file |
:Sprocket log |
Open the LSP log file for debugging |
Add the status component to your statusline to see LSP status at a glance:
-- lualine.nvim
require("lualine").setup({
sections = {
lualine_x = { require("sprocket").status },
},
})Icons indicate server status:
- ๓ฐก Running normally
- Warning
- Error
- ๓ฐฎ Starting/loading
Run :checkhealth sprocket to verify your setup. The health check reports:
- Neovim version compatibility
- Binary availability and version
- Required tools (
curl,tar/unzipfor auto-install) - LSP server status
- Optional dependencies (
nvim-cmp) - Current configuration
| Plugin | Benefit |
|---|---|
| nvim-cmp + cmp-nvim-lsp | Enhanced completion with LSP integration |
| nvim-autopairs | Auto-close <<</>>>, ~{/}, ${/} pairs |
| Comment.nvim | Toggle comments with gc mappings |
LSP not starting?
- Verify sprocket is installed:
:Sprocket version - Check the LSP log:
:Sprocket log - Ensure the file has a
.wdlextension - Run
:checkhealth sprocket
No completions?
- Confirm LSP is running:
:Sprocket info - If using
nvim-cmp, verifycmp-nvim-lspis configured - Check for syntax errors in your WDL file
Formatting not working?
- Check for syntax errors (formatting requires valid WDL)
- Update sprocket:
:Sprocket update - Check the LSP log:
:Sprocket log
Contributions are welcome! Please feel free to submit a Pull Request.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Copyright ยฉ 2026-Present St. Jude Children's Research Hospital.