Interactive RegExp Testing: Hypersonic provides an interactive testing environment right within NeoVim. You can easily write your RegExp patterns and instantly see the matches highlighted in real-time.
Pattern Explanation: Understanding complex RegExp patterns can be challenging. Hypersonic comes with an integrated pattern explanation feature that provides detailed explanations for your RegExp patterns, helping you grasp their meaning and behavior.
v0.8.3
(only tested one)(?:)
)(?:<name>)
)(?:)
)(?=)
, (?!)
, (?<=)
, (?<!)
):Hypersonic
:Hypersonic your-regex
/your-regex
or ?your-regex
Plug 'tomiis4/Hypersonic.nvim'
use 'tomiis4/Hypersonic.nvim'
{
'tomiis4/Hypersonic.nvim',
event = "CmdlineEnter",
cmd = "Hypersonic",
config = function()
require('hypersonic').setup({
-- config
})
end
},
require('hypersonic').setup()
require('hypersonic').setup({
---@type 'none'|'single'|'double'|'rounded'|'solid'|'shadow'|table
border = 'rounded',
---@type number 0-100
winblend = 0,
---@type boolean
add_padding = true,
---@type string
hl_group = 'Keyword',
---@type string
wrapping = '"',
---@type boolean
enable_cmdline = true
})
| LICENSE
| README.md
|
+---lua
| \---hypersonic
| config.lua
| explain.lua
| init.lua
| merge.lua
| split.lua
| tables.lua
| utils.lua
|
+---plugin
| hypersonic.lua
|
\---test
testing_file.txt
testing_file.lua
gr[ae]y
{
{
type = "character",
value = "g"
},
{
type = "character",
value = "r"
},
{
type = "class",
value = "ae"
},
{
type = "character",
value = "y"
}
}
local meta_table = {
['n'] = 'Newline',
['r'] = 'Carriage return',
['t'] = 'Tab',
['s'] = 'Any whitespace character',
['S'] = 'Any non-whitespace character',
['d'] = 'Any digit',
-- more in tables.lua
}
{
type = 'character'|'escaped'|'class'|'group'|'quantifier',
value = '',
children = Node|{},
quantifiers = ''
}
main={}
(type: Node[])\
main
[
]
[]
to main
]
(
)
()
to children
)
?
|+
|*
Node.quantifiers
{
{
type = "character",
value = "g"
},
{
type = "character",
value = "r"
},
{
type = "class",
value = "ae"
},
{
type = "character",
value = "y"
}
}
{
{
explanation = "Match g",
value = "g"
},
{
explanation = "Match r",
value = "r"
},
{
children = { "a", "e" },
explanation = "Match either",
value = "[ae]"
},
{
explanation = "Match y",
value = "y"
}
}
main={}
(type: Explained[])type == escaped | character
type == class
explain_class
type == group
explain
{
{
explanation = "Match g",
value = "g"
},
{
explanation = "Match r",
value = "r"
},
{
children = { "a", "e" },
explanation = "Match either",
value = "[ae]"
},
{
explanation = "Match y",
value = "y"
}
}
{
{
explanation = "Match gr",
value = "gr"
},
{
explanation = "Match either",
children = { "a or e" },
value = "[ae]"
},
{
explanation = "Match y",
value = "y"
}
}
+-gr[ae]y------------------------------+
| "gr": Match gr |
| "[ae]": Match either |
| 1) a or e |
| "y": Match y |
+--------------------------------------+