A Language Server Protocol (LSP) implementation for Strudel - a browser-based live coding language for algorithmic music patterns.
- Completion: 85+ Strudel functions and 70+ sample names
- Hover: Function documentation
- Diagnostics: Basic syntax validation (bracket matching)
- Supported Editors: Neovim (0.10+), VS Code
Pattern functions: sound, note, s, n, fast, slow, stack, cat, seq, jux, rev, room, delay, cutoff, gain, pan, speed, shape, vowel, crush, chop, sometimes, every, when, layer, linger, ply, repeat, arp, stride, begin, end, and more.
Samples: bd, sd, hh, cp, 808, 909, kick, snare, hihat, and more.
# Install dependencies
npm install
# Compile TypeScript
cd server && npx tsc-
Start the LSP server (Terminal 1):
cd server/out node server.js --tcp -
Open Neovim (Terminal 2):
nvim -u neovim-test.lua test.strudel
-
Test completion: Type
sound("and pressCtrl+xCtrl+o -
Test hover: Press
Kon a function name
The server supports two modes:
-
stdio mode (default, for VS Code):
node server.js
-
TCP mode (for Neovim debugging):
node server.js --tcp
TCP mode listens on port 5007.
-
Check LSP status in Neovim:
:LspStatus
-
View LSP logs:
:lua vim.lsp.set_log_level('debug') :lua print(vim.lsp.get_log_path())
-
Ensure port 5007 is available:
lsof -i :5007
npm run compilestrudel-lsp-server/
├── client/ # VS Code extension (language client)
├── server/ # LSP server implementation
│ ├── src/server.ts # Main server code
│ └── out/ # Compiled JavaScript
├── neovim-test.lua # Neovim test configuration
├── test.strudel # Test file
└── package.json # Root package config
MIT