feat(neovim): add vim-tidal plugin for TidalCycles live coding#365
Open
etrobert-bot wants to merge 5 commits into
Open
feat(neovim): add vim-tidal plugin for TidalCycles live coding#365etrobert-bot wants to merge 5 commits into
etrobert-bot wants to merge 5 commits into
Conversation
Packages vim-tidal (not in nixpkgs) from GitHub and wires it into the neovim-wrapped plugin set. Sets g:tidal_target = "tmux" so pattern lines are pasted into a tmux pane running GHCi+Tidal. The pattern language and audio engine come from a project's nix devShell (see the electronic-music TidalCycles flake), not from the editor; this plugin only ships lines to a running GHCi. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
etrobert-bot
commented
Jun 26, 2026
etrobert-bot
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewed thoroughly — checked out the branch, ran nix build .#neovim-wrapped, exercised the built nvim headlessly, and verified every claim against the vim-tidal upstream source. Everything holds up:
- vim-tidal really isn't in nixpkgs (
nix eval nixpkgs#vimPluginsfinds no tidal plugin). e440fe5is the current HEAD of the default branch, dated 2023-06-02 (matches theversion).- The
v1.xtags are indeed old — latest tag1.4.8is from 2020-04-01, ~3 years older than the pinned commit. g:tidal_target = "tmux"is a genuine behavior change, not a no-op: on nvim the upstream default is"terminal"(if has('nvim')…), so this is necessary for the tmux workflow.- Build succeeds; headless nvim confirms
g:tidal_target == "tmux",:TidalSendexists, and.tidalfiles get filetypetidal.<localleader>smaps toTidalLineSend/TidalRegionSendperftplugin/tidal.vim. extraPackages = [ tmux ]is required (tmux-mode shells out totmux); the overlap with vim-tmux-navigator's tmux dep is harmless and per-plugin self-containment matches the repo convention.
No correctness issues and nothing extraneous in the derivation. Just three optional consistency nits below — all non-blocking.
…comment Address review on the tidal plugin: - Use SRI `hash = "sha256-..."` instead of base32 `sha256` (algorithm-explicit, matches the existing cmp third-party fetch). - Use the modern nixpkgs `<version>-unstable-<date>` version scheme for both unpinned GitHub fetches: vim-tidal -> 1.4.8-unstable-2023-06-02, and migrate tailwindcss-colorizer-cmp-nvim from the bare-date 2024-01-01 (also wrong: the pinned rev is dated 2024-03-23) to 0-unstable-2024-03-23. - Trim the verbose config comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tidal patterns are Haskell expressions, so reuse the Haskell tooling: - conform runs ormolu over the 'tidal' filetype (ormolu reformats bare pattern lines; stylish-haskell leaves operator spacing untouched, and haskell-language-server needs a cabal/stack project so it can't drive standalone .tidal buffers). - register the 'tidal' filetype against the haskell treesitter grammar for highlighting, and add the grammar to nvim-treesitter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bare ormolu parses the whole file as one Haskell module, which fails on real Tidal: multi-line patterns put a closing ] or # at column 1 (illegal mid-declaration in a module, but fine as a standalone GHCi expression), and one unformattable block makes ormolu bail on the entire file so nothing formats. Add a tidal-fmt wrapper that treats the file as what it is -- a sequence of blank-line-separated GHCi statements -- and formats each block independently: bare ormolu first (correct for simple/adjacent statements), else wrap the block as an indented binding so column-1 continuations parse, else pass the block through untouched (GHCi :t/:set lines, anything unparseable). Idempotent. Wire it into conform as a custom formatter for the tidal filetype, replacing the bare ormolu entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This reverts commit 66ac33d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
tidalplugin module toneovim-wrappedthat packages vim-tidal (not in nixpkgs) and wires it into the plugin set.e440fe5) viabuildVimPlugin+fetchFromGitHub— thev1.xtags are old; it's a stable vimscript plugin.g:tidal_target = "tmux"so pattern lines are pasted into a tmux pane running GHCi+Tidal (pairs with the existingvim-tmux-navigatorworkflow).Why
Companion to a TidalCycles flake in the
electronic-musicproject. The split is deliberate:nix develop.In tmux mode vim-tidal only ships lines to a running GHCi — it does not boot one — so the workflow is:
superdirtin one pane,tidal(GHCi booted with Tidal) in another, send lines from a.tidalbuffer.Verification
nix build .#neovim-wrappedsucceeds; vim-tidal builds.g:tidal_target == "tmux",:TidalSendexists,.tidalfiles get filetypetidal.🤖 Generated with Claude Code