Open alexgorbatchev opened 4 months ago
Try removing the leading part completely. (starting with "/") That should do the trick.
cheers
This config causes my neovim (0.10) to freeze for about a minute on a macbook pro m3
{
pattern = "([^.]+).(tsx?)$",
target = {
{ target = "**/%1.test.%2", context = "test" },
{ target = "**/%1.stories.%2", context = "stories" },
},
},
I have to use this, which works, but not ideal, i would prefer not to have src/
prefix. The /.*/([^.]+).(tsx?)$
also causes neovim to freeze
{
pattern = "src/.*/([^.]+).(tsx?)$",
target = {
{ target = "**/%1.test.%2", context = "test" },
{ target = "**/%1.stories.%2", context = "stories" },
},
},
my full config is
require("other-nvim").setup({
rememberBuffers = false,
showMissingFiles = false,
mappings = {
{
pattern = "src/.*/([^.]+).(tsx?)$",
target = {
{ target = "**/%1.test.%2", context = "test" },
{ target = "**/%1.stories.%2", context = "stories" },
},
},
{
pattern = "src/.*/([^.]+).test.(tsx?)$",
target = {
{ target = "**/%1.%2", context = "source" },
{ target = "**/%1.stories.%2", context = "stories" },
},
},
{
pattern = "src/.*/([^.]+).stories.(tsx?)$",
target = {
{ target = "**/%1.%2", context = "source" },
{ target = "**/%1.test.%2", context = "test" },
},
},
},
})
Odd issue in pattern matching:
src/.*/([^.]+).(tsx?)$
- works.*/([^.]+).(tsx?)$
- doesn't (same as above, minussrc/
. I would expect this to work as well.