# Verify your stack is working
ghci --version # GHC for Tidal
sclang --version # SuperCollider
nvim --version # Neovim 0.5+In your user/plugins/tidal.lua or user.lua, modify your existing tidal plugin:
{
"grddavies/tidal.nvim",
opts = {
-- Your existing config...
boot = {
tidal = {
cmd = "ghci",
args = { "-v0" },
file = vim.api.nvim_get_runtime_file("bootfiles/BootTidal.hs", false)[1],
enabled = true,
},
sclang = {
cmd = "sclang",
args = {},
file = vim.api.nvim_get_runtime_file("bootfiles/BootSuperDirt.scd", false)[1],
enabled = false,
},
split = "v",
},
mappings = {
send_line = { mode = { "i", "n" }, key = "<S-CR>" },
send_visual = { mode = { "x" }, key = "<S-CR>" },
send_block = { mode = { "i", "n", "x" }, key = "<M-CR>" },
send_node = { mode = "n", key = "<leader><CR>" },
send_silence = { mode = "n", key = "<leader>m" },
send_hush = { mode = "n", key = "<leader><Esc>" },
},
selection_highlight = {
highlight = { link = "IncSearch" },
timeout = 150,
},
},
dependencies = {
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "haskell", "supercollider" } },
},
},
-- ADD THE HIGHLIGHTING PLUGIN
{
"b0id/HighTideLight.nvim",
dependencies = { "grddavies/tidal.nvim" },
config = function()
require('tidal-highlight').setup({
debug = true, -- IMPORTANT: Enable for initial testing
osc = {
ip = "127.0.0.1",
port = 6011, -- Different from SuperDirt's 6010
},
animation = {
fps = 30,
duration_ms = 500, -- Longer for testing
},
highlights = {
groups = {
{ name = "TidalEvent1", fg = "#ff6b6b", bg = nil, blend = 30 },
{ name = "TidalEvent2", fg = "#4ecdc4", bg = nil, blend = 30 },
{ name = "TidalEvent3", fg = "#45b7d1", bg = nil, blend = 30 },
},
},
})
end,
},# Start AstroNvim - it should install the plugin
nvimBefore testing with real Tidal, run diagnostics:
:TidalHighlightDiagnosticsThis will check:
- ✅ Environment compatibility
- ✅ Tidal plugin detection (
grddavies/tidal.nvim) - ✅ OSC connectivity
- ✅ Pattern processor
- ✅ Integration hooks
Expected Output:
🔍 HighTideLight.nvim Diagnostics
==================================================
📋 Environment:
Neovim: 0.9.x ✅
Lua: Lua 5.1 ✅
Loop support: ✅
Bit operations: ✅
Tidal plugin: grddavies/tidal.nvim ✅
Send function: ❌ (Expected - grddavies uses different API)
🌐 OSC Connectivity:
OSC server: ✅
Port 6011: Available
Callbacks: ✅
⚙️ Processor:
Pattern processing: ✅
Pattern 1: 2 markers, context: ✅
Pattern 2: 4 markers, context: ✅
Pattern 3: 3 markers, context: ✅
🎵 Tidal Integration:
Plugin detected: grddavies/tidal.nvim ✅
Hook installed: ✅
Result: Wrapped X evaluation functions
==================================================
🎉 All systems ready! Plugin should work in real environment.
Test the highlighting system works:
:TidalHighlightTestYou should see highlighting on the current line. If this works, the plugin can render highlights.
In SuperCollider, evaluate this code:
// Load the HighTideLight OSC bridge
(
~highlightDebug = true; // Enable verbose output
"path/to/HighTideLight.nvim/supercollider/HighTideLightOSC.scd".load;
)// Test that SuperCollider can send to Neovim
~testTidalHighlight.();You should see a test highlight in Neovim.
Create test.tidal:
d1 $ sound "bd sn"
d1 $ sound "bd sn hh oh"
d1 $ sound "bd sn" # gain 0.8- Open
test.tidalin Neovim - Start Tidal with
:TidalStart(or your usual method) - Position cursor on first line
- Evaluate with
<S-CR>(your mapping)
Watch for debug output:
- Neovim should show: "HighTideLight: Wrapped X evaluation functions"
- SuperCollider should show: "Received pattern registration: d1 $ sound "bd sn""
- You should see highlights appear on the Tidal code
-
No hook detected
:lua vim.notify(vim.inspect(require('tidal-highlight.compat').get_tidal_info()))
-
OSC port conflicts
netstat -ln | grep 6011 -
SuperCollider not sending
// Check if bridge is loaded ~highlightOSC.postln;
-
No highlights appearing
:TidalHighlightClear " Clear old highlights :TidalHighlightTest " Test basic highlighting
:TidalHighlightToggle " Toggle on/off
:TidalHighlightClear " Clear all highlights
:TidalHighlightDiagnostics " Run full diagnostics
:TidalHighlightTest " Test basic highlightingWhen working correctly:
- Code Evaluation: You evaluate
d1 $ sound "bd sn" - Processing: Plugin processes the code, finds
"bd"and"sn" - Registration: SuperCollider receives the pattern
- Playback: When Tidal plays the pattern, SuperCollider sends highlight events
- Highlighting: Words
bdandsnhighlight in sync with audio
If basic integration works, we can:
- Improve timing precision - sync highlights with actual beat timing
- Add more pattern types - handle complex Tidal constructs
- Enhance visual effects - fade animations, color coding
- Add configuration - customize highlight styles per pattern type
Let me know what happens when you run the diagnostics!