From 4b55548a967326ff5bd9e6cfd4780d7d3d804b02 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Mon, 3 Jun 2024 08:15:10 +0100 Subject: [PATCH] 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. --- site-modules/core/files/vim/plugin/spec.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site-modules/core/files/vim/plugin/spec.lua b/site-modules/core/files/vim/plugin/spec.lua index 6e46a5c..9d6a273 100644 --- a/site-modules/core/files/vim/plugin/spec.lua +++ b/site-modules/core/files/vim/plugin/spec.lua @@ -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)