Skip to content

v2.0.0

Latest

Choose a tag to compare

@bennypowers bennypowers released this 14 Apr 16:15
· 1 commit to main since this release

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