From 265803b24032e218310eddc32305fdad413ed16f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 5 Sep 2023 12:56:24 +0100 Subject: [PATCH] feat(nvim): configure alternate files for Fractal Configure `*.twig` and `*.config.yml` as alternate files in Projectionist. --- after/plugin/projectionist.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/after/plugin/projectionist.lua b/after/plugin/projectionist.lua index 681cf4b..dcdc45c 100644 --- a/after/plugin/projectionist.lua +++ b/after/plugin/projectionist.lua @@ -1,4 +1,4 @@ -vim.g.projectionist_heuristics = { +local heuristics = { ["composer.json"] = { ["src/*.php"] = { type = "source", @@ -23,6 +23,16 @@ vim.g.projectionist_heuristics = { }, }, + ["fractal.config.js"] = { + ["*.config.yml"] = { + alternate = "{dirname}/{basename}.twig", + }, + + ["*.twig"] = { + alternate = "{dirname}/{basename}.config.yml", + }, + }, + ["package.json"] = { ["src/*.ts"] = { type = "source", @@ -40,3 +50,5 @@ vim.g.projectionist_heuristics = { }, }, } + +vim.g.projectionist_heuristics = heuristics