# NeoVim Event Highlighting + custom keybindings

**URL:** <https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896>\
**Category:** Announcements\
**Created:** [6 September 2025 19:40 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896 "2025-09-06T19:40:07Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [25 September 2025 16:53 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/41 "2025-09-25T16:53:00Z")

</div>

Oh! I will have a look. I introduced this issue in the Pulsar plugin as well and thought I fixed it on both sides.

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [25 September 2025 16:56 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/42 "2025-09-25T16:56:52Z")

</div>

Yes, this is a known error, but I will fix that. I need to add a list of functions that should be ignored from the event highlighting. The value of the p function is not a pattern. But I treat every string (which is overloaded to create pattern out of them) as a Control Pattern and wrap the deltaContext function around it. But for p this results in a syntax error. It’s a real lightweight implementation and I am not doing any kind of parsing. Anyway having a lightweight solution with some intentional design flaws is still better then no solution 🙂 maybe the next step could be to think about a better implementation on the tidal side, so that it will become easier to implement it in the editor side.

---

<div class="post-metadata">

**Author:** ![brepundtrep](https://uzu.lurk.org/user_avatar/uzu.lurk.org/brepundtrep/32/887_2.png) [@brepundtrep](https://uzu.lurk.org/u/brepundtrep)\
**Post date:** [25 September 2025 17:11 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/43 "2025-09-25T17:11:14Z")

</div>

Ah, perfect, now I understand a bit better what’s going on. Yes, I see that the issue with `p` and `deltaContext` is expected given how the editor works: it’s a lightweight implementation that doesn’t do full parsing, so `p` isn’t handled like a normal pattern. For those of us used to TidalVim, it would be more convenient if `deltaContext` were available, but this NeoVim version is lighter, and I can adapt to these changes. I think having this lightweight solution, even with some intentional limitations, is fine as long as it’s functional. Cheers!

---

<div class="post-metadata">

**Author:** ![brepundtrep](https://uzu.lurk.org/user_avatar/uzu.lurk.org/brepundtrep/32/887_2.png) [@brepundtrep](https://uzu.lurk.org/u/brepundtrep)\
**Post date:** [25 September 2025 17:14 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/44 "2025-09-25T17:14:52Z")

</div>

I confirm this about the first line. 😀

---

<div class="post-metadata">

**Author:** ![amitmaish](https://uzu.lurk.org/user_avatar/uzu.lurk.org/amitmaish/32/3292_2.png) [@amitmaish](https://uzu.lurk.org/u/amitmaish)\
**Post date:** [25 September 2025 17:26 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/45 "2025-09-25T17:26:39Z")

</div>

Thanks so much, this was the issue. That’s silly of me. I think it would be cool to have a demo song in the repo so people could play around with it. I can submit that once I’ve had a bit more time with Tidal

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [25 September 2025 18:31 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/46 "2025-09-25T18:31:35Z")

</div>

@vlachaizle , @brepundtrep , @DavidZwitser , the bug with the first line should be resolved. Would be awesome, if you could try it out.

---

<div class="post-metadata">

**Author:** ![amitmaish](https://uzu.lurk.org/user_avatar/uzu.lurk.org/amitmaish/32/3292_2.png) [@amitmaish](https://uzu.lurk.org/u/amitmaish)\
**Post date:** [25 September 2025 18:53 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/48 "2025-09-25T18:53:28Z")

</div>

I just tested it and it works. Highlighting everywhere.

---

<div class="post-metadata">

**Author:** ![brepundtrep](https://uzu.lurk.org/user_avatar/uzu.lurk.org/brepundtrep/32/887_2.png) [@brepundtrep](https://uzu.lurk.org/u/brepundtrep)\
**Post date:** [25 September 2025 19:26 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/49 "2025-09-25T19:26:14Z")

</div>

works fine 👍

---

<div class="post-metadata">

**Author:** ![amitmaish](https://uzu.lurk.org/user_avatar/uzu.lurk.org/amitmaish/32/3292_2.png) [@amitmaish](https://uzu.lurk.org/u/amitmaish)\
**Post date:** [26 September 2025 20:24 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/50 "2025-09-26T20:24:27Z")

</div>

@mrreason, I was looking at scnvim to use supercollider within neovim, and I wanted to start it when I ran `:TidalLaunch`. I added a user autocommand with the pattern “TidalLaunch” in the `:TidalLaunch` function that I then hooked into scnvim in my personal config to automatically launch supercollider with tidal.

I think this is an elegant solution for separating supercollider from tidal.nvim while still allowing everything to be done with one command.

If you’d like I can submit this change as a pr

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [28 September 2025 17:11 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/51 "2025-09-28T17:11:55Z")

</div>

Just on quick thought about this, and I would like to hear your opinion. Because I think I would like to try out scnvim as well anyway and you have an approach that sounds charming to me. I am just curious whether we should keep the currently in-build SuperCollider version or whether we should have both options or should we just support scnvim? I have no strong feelings here. And should be scnvim a dependency? I doubt that (but then we need a check here?!), because someone may wanna use the SuperCollider IDE.

WDYT?

---

<div class="post-metadata">

**Author:** ![amitmaish](https://uzu.lurk.org/user_avatar/uzu.lurk.org/amitmaish/32/3292_2.png) [@amitmaish](https://uzu.lurk.org/u/amitmaish)\
**Post date:** [28 September 2025 20:13 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/52 "2025-09-28T20:13:58Z")

</div>

I made scnvim start with a user autocommand that’s executed on the “TidalLaunch” pattern. If installed with Lazy and using the recommended settings, scnvim is only loaded for supercollider files. You either need to remove that from your scnvim configuration or you need to add scnvim as a dependency to tidal.nvim (which is what I did) which ensures scnvim is loaded whenever tidal.nvim is.

If you wanted to use the SuperCollider IDE you simply don’t add that autocommand to your configuration. In my personal config, I check to see that the environnment variable `SC_NOAUTOSTART` isn’t defined before I register that autocommand so that I can make that determination on a project by project basis. I do something similar for the bootfiles, though that’s a bit off topic.

I won’t comment on the current SuperCollider support, I initially started using scnvim because whenever I tried to use it I couldn’t get it to work.

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [20 October 2025 19:24 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/53 "2025-10-20T19:24:52Z")

</div>

The more I became familiar with NeoVim, the more sens this makes to me. Thanks for creating the PR on GitHub and sorry for the long delay. To create an autocommand for “TidalLaunch” makes sense. It would be really awesome, when you could provide a small example in the README or at least create a first list for the available autocommands.

I indent to add more (like TidalHush) that I already use.

---

<div class="post-metadata">

**Author:** ![amitmaish](https://uzu.lurk.org/user_avatar/uzu.lurk.org/amitmaish/32/3292_2.png) [@amitmaish](https://uzu.lurk.org/u/amitmaish)\
**Post date:** [20 October 2025 19:37 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/54 "2025-10-20T19:37:47Z")

</div>

Of course, I can update the readme. I was thinking that `TidalQuit` should probably also get an autocommand, and I’m sure other people will have their own requests.

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [23 January 2026 21:40 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/55 "2026-01-23T21:40:14Z")

</div>

I had a major success after some weeks of work to enhance the event highlighting! I really would like to receive some feedback, before I merge this to main. Please provide me some feedback in this thread: [Improve event highlighting by using Tidals PlayState · Issue #14 · thgrund/tidal.nvim · GitHub](https://github.com/thgrund/tidal.nvim/issues/14#issuecomment-3792477512)

Please try out the event highlighting with the tidal playstate (it's reliable, it's fast, it performs well and it will allow us at least strudel like pattern visualization! yeah! 🙂 → I run the highlights with up to 120fps without big issues on my machine). This works, because I receive the Tidal playstate with all time and event informations from stdout. I can calculate the events beforehand. All other methods used the the current state within a specific time and this live edge approach was hard to stabilize.

In the basic form you just need to add this in your tidal.nvim file:

```lua
return {
  "thgrund/tidal.nvim",
  branch = "improve-event-highlighting",
  opts = {},
  -- Recommended: Install TreeSitter parsers for Haskell and SuperCollider
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
    opts = { ensure_installed = { "haskell", "supercollider" } },
  },
}

```

If you use your own `BootTidal.hs`, then you need to define a clock target like this:

```haskell
let clockShape = OSC "/ping" $ Named {requiredArgs = ["clock"]}
let clockTarget = Target {oName = "clock", oAddress = "127.0.0.1", oPort = 6013, oLatency = ((3/10)), oSchedule = Live, oWindow = Nothing, oHandshake = False, oBusPort = Nothing }

tidalInst <- mkTidalWith [(superdirtTarget { oLatency = (0.15) }, [superdirtShape]), (clockTarget, [clockShape])] (defaultConfig {cFrameTimespan = 1/50, cProcessAhead = 3/10})

```

Otherwise the inbuild BootTidal is correctly pre configured.

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [12 February 2026 22:44 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/56 "2026-02-12T22:44:26Z")

</div>

I updated the nvim plugin with the optimized event highlighting. Now I am able to use the internal TidalCycles play state. This increases the reliability and performance tremendously. You can see it here in action (no tone):

https://www.youtube.com/embed/l2IrELGzFpc?feature=oembed&wmode=opaque

I will resolve the open Issues and write a blog post about this topic, to document my journey so far. But then! I am able to integrate TidalCycles pattern visualization, like we have for Strudel, in nvim 🙂 I already played around with the possible pattern representation in a TUI and this is my prototype:

 ![grafik](https://club.tidalcycles.org/uploads/default/original/2X/d/db1a49286418818868d668081f76a9afbdb6f1cd.png)

When I resolved these topics, then I will port my implementation to Pulsar (see [Pulsar Editor Event Highlighting](https://club.tidalcycles.org/t/pulsar-editor-event-highlighting/5952)). But I am still so excited by these topics 🙂 Stay tuned!

---

<div class="post-metadata">

**Author:** ![brepundtrep](https://uzu.lurk.org/user_avatar/uzu.lurk.org/brepundtrep/32/887_2.png) [@brepundtrep](https://uzu.lurk.org/u/brepundtrep)\
**Post date:** [13 February 2026 13:34 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/57 "2026-02-13T13:34:56Z")

</div>

@mrreason I’ve been using your Tidal Neovim version with highlighting for the past few weeks and it’s been really stable. Great work.

The sound freezing issue I used to have somehow hasn’t happened again, which is amazing.

Also, running everything at 120 fps adds an interesting visual feedback layer to experiment with, especially since I’ve been exploring TUIs quite a lot over the past few days.

Best

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [13 February 2026 15:01 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/58 "2026-02-13T15:01:07Z")

</div>

Wow, that’s amazing 🤩 thanks for the feedback, I really appreciate that! 🙏 I wish you a ton of fun with the plugin!

Btw, this plugin development is my excuse to dive into the TUI world as well. Before that I didn’t took that to serious 😉

---

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [20 February 2026 19:23 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/59 "2026-02-20T19:23:05Z")

</div>

Thanks so much @mrreason (and @grddavies ) - this is something I’ve been so hopeful of happening ever since feedforward started experimenting with it.

It took a bit of trickery to get going for me (ubuntu 24.04) mainly due to the nvim-treesitter rewrite, but also due to me moving away from the vim-plug config manager to lazy.nvim (unfamiliarity).

It `nvim-treesitter` requires the manual install of a `tree-sitter` binary `> 0.26.1` now (the one in the 24.04 repos is not new enough).

[I’ve documented bits and pieces in a repo here](https://codeberg.org/cleary/dot.nvim) if anyone else is facing similar difficulties - the configs are all there, it’s **only** got this plugin in it at the moment, but I will be migrating the rest of my configs in over time.

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [29 May 2026 12:32 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/60 "2026-05-29T12:32:40Z")

</div>

I finally moved my NeoVim plugin version to Codeberg. Any further development from my end will happen there. Contributions are very welcome! You will find it here:

[https://codeberg.org/MrReason/tidal.nvim](https://codeberg.org/MrReason/tidal.nvim)

---

<div class="post-metadata">

**Author:** ![scrappy\_fiddler](https://uzu.lurk.org/user_avatar/uzu.lurk.org/scrappy_fiddler/32/3524_2.png) [@scrappy\_fiddler](https://uzu.lurk.org/u/scrappy_fiddler)\
**Post date:** [29 May 2026 12:47 UTC](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896/61 "2026-05-29T12:47:25Z")

</div>

Welcome to codeberg!

edit: please ignore everything below the "apparently it is very hard for me to tell strudel and tidal apart" line

--------

The strudel FAQ has the github link ( [Frequently Asked Questions 🌀 Strudel](https://strudel.cc/learn/faq/#can-i-use-strudel-with-my-ide) ) and it might take a bit to get updated.

Do you plan to put a not on the github page so people dont accidentally start to use a stale version?

[Previous page](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896.md?page=2)

[Next page](https://uzu.lurk.org/t/neovim-event-highlighting-custom-keybindings/5896.md?page=4)
