Releases: bennypowers/nvim-regexplainer
Releases · bennypowers/nvim-regexplainer
v2.0.0
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
filetypesconfig now expects Neovim filetype names (e.g.'javascript','ruby') instead of file extensions ('js','rb'). The plugin usesFileTypeautocommands 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 otherremodule 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 otherpreg_*functions. PCRE delimiters are automatically stripped. - Java --
Pattern.compile()andStringregex methods (matches,replaceAll,replaceFirst,split). Escape sequences automatically unescaped. - C# --
new Regex()and staticRegexmethods (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
CursorMovedhandlers are set up per-buffer only when a matching filetype is opened, not globally.
Healthcheck Improvements
:checkhealth regexplainernow 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 (
:TSInstallwhen 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
CursorMovedautocommand - Split position config is respected
- Hologram images cleaned up properly on unmount
v1.1.0 - Regexp Railroad Diagrams
🚂 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
What's Changed
- docs: Am Yisrael Chai by @bennypowers in #42
- fix!: query down instead of up by @bennypowers in #45
BREAKING CHANGES:
- require tree-sitter-regexp 0.21
- require nvim 0.10
- replace
narrative.separatorwithnarrative.indentation_string - change
component.depthtocomponent.capture_depthinnarrative.indentation_stringfunction
Full Changelog: v0.0.1...v1.0.0
v0.0.1 - Neovim 0.9.5
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
- feat: add
RegexplainerTogglebinding by @bennypowers in #7 - feat!: merge user config by @axieax in #6
- test: automatically derive tests from fixtures by @bennypowers in #12
- fix!: require neovim 0.7 by @bennypowers in #13
- feat: filetypes by @bennypowers in #14
- fix: show split works when popup is the configured display by @bennypowers in #15
- style: lint with stylua by @bennypowers in #16
- fix: typeerrors from nui by @bennypowers in #17
- docs: Addition of the need to add regex(https://github.com/tree-sitter/tree-sitter-regex) in treesitter by @KaniyaSimeji in #18
- feat!: yank by @bennypowers in #19
- refactor: cleaning up main ts loop by @bennypowers in #20
- fix: use native vim.treesitter.get_node_range by @yutkat in #33
- fix: hide when switching buffers by @bennypowers in #34
- fix: Update deprecated treesitter functions by @yutkat in #35
- fix!: lookaround assertions by @bennypowers in #39
- refactor!: remove nvim-treesitter dependency by @amaanq in #41
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