feat(vim): implement lua go to spec

This add a pattern for all lua files that will go to the corresponding
spec files. I don't think this will work on all the different projects
but, its a good start. There may need to be some tweaking to make it
work in vim plugins.
This commit is contained in:
Ade Attwood 2024-06-03 08:15:10 +01:00
parent 5d68da6e36
commit 4b55548a96

View file

@ -28,6 +28,10 @@ local alternates = {
{ type = alternate_type.SPEC, file = "spec/%1.spec.%2" },
{ type = alternate_type.SPEC, file = "tests/%1.spec.%2", default = true },
},
["(.*)%.lua$"] = {
{ type = alternate_type.SPEC, file = "spec/%1_spec.lua", default = true },
},
}
local function file_exists(filename)