Skip to content

Releases: bennypowers/nvim-regexplainer

v2.0.0

14 Apr 16:15

Choose a tag to compare

Breaking Changes

  • Neovim 0.11+ required -- deprecated APIs removed for forward compatibility
  • nui.nvim is no longer a dependency -- popup and split windows use native Neovim APIs
  • filetypes config now expects Neovim filetype names (e.g. 'javascript', 'ruby') instead of file extensions ('js', 'rb'). The plugin uses FileType autocommands instead of file-glob patterns.

New Language Support

Regexplainer now works in 7 additional languages beyond JavaScript/TypeScript/HTML:

  • Ruby -- /pattern/ regex literals
  • Python -- re.compile(), re.match(), re.search(), re.sub(), re.findall(), and other re module calls. Both raw strings (r"...") and regular strings supported.
  • Go -- regexp.Compile(), regexp.MustCompile(), and POSIX variants. Raw strings (backtick) and interpreted strings supported.
  • Rust -- Regex::new(), RegexBuilder::new(). Raw strings (r"...") and regular strings supported.
  • PHP -- preg_match(), preg_replace(), preg_split(), and other preg_* functions. PCRE delimiters are automatically stripped.
  • Java -- Pattern.compile() and String regex methods (matches, replaceAll, replaceFirst, split). Escape sequences automatically unescaped.
  • C# -- new Regex() and static Regex methods (IsMatch, Match, Replace, Split). Both verbatim strings (@"...") and regular strings supported.

Performance

  • Lazy loading -- the plugin file no longer loads any modules at startup. All heavy requires (component tree, treesitter utils, buffer management, cache) are deferred to first use.
  • FileType autocommands -- keymaps and CursorMoved handlers are set up per-buffer only when a matching filetype is opened, not globally.

Healthcheck Improvements

  • :checkhealth regexplainer now verifies both injection-based languages (JS, TS, HTML, Ruby) and query-based languages (Python, Go, Rust, PHP, Java, C#)
  • Missing parsers show actionable install advice (:TSInstall when nvim-treesitter is available, manual instructions otherwise)
  • Healthcheck no longer crashes when one language's parser is missing

Fixes

  • Popup windows no longer overflow the right edge of the window when the cursor is far from the left margin
  • Missing treesitter parsers are handled gracefully instead of crashing the CursorMoved autocommand
  • Split position config is respected
  • Hologram images cleaned up properly on unmount

v1.1.0 - Regexp Railroad Diagrams

08 Sep 19:03

Choose a tag to compare

🚂 NEW: nvim-regexplainer now supports visual railroad diagrams!

Turn this: /^(https?):\/\/([^\/]+)(\/.*)?$/
Into this:

railroads.webm

✨ Features:
• Works in popup & split modes
• Auto-manages Python deps
• Cached for speed
• Cross-platform

Perfect for understanding complex regex at a glance!

v1.0.0

28 May 17:59

Choose a tag to compare

What's Changed

BREAKING CHANGES:

  • require tree-sitter-regexp 0.21
  • require nvim 0.10
  • replace narrative.separator with narrative.indentation_string
  • change component.depth to component.capture_depth in narrative.indentation_string function

Full Changelog: v0.0.1...v1.0.0

v0.0.1 - Neovim 0.9.5

28 May 17:57
187f866

Choose a tag to compare

This release marks that last commit which I'm reasonably confident will still work with nvim 0.9. You might need to pin versions of dependencies as well, in particular tree-sitter-regex

What's Changed

New Contributors

  • @axieax made their first contribution in #6
  • @KaniyaSimeji made their first contribution in #18
  • @yutkat made their first contribution in #33
  • @amaanq made their first contribution in #41

Full Changelog: https://github.com/bennypowers/nvim-regexplainer/commits/v0.0.1