feat(nvim): re-add projectionist.vim

Re-add `projectionist.vim` with a minimal configuration for setting the
alternate file in basic PHP library or TypeScript projects.
This commit is contained in:
Oliver Davies 2023-09-05 07:34:17 +01:00
parent 767269b904
commit 7c4f361f28

View file

@ -0,0 +1,42 @@
vim.g.projectionist_heuristics = {
["composer.json"] = {
["src/*.php"] = {
type = "source",
alternate = "tests/{}Test.php",
},
["src/Controller/*.php"] = {
type = "controller",
},
["src/Model/*.php"] = {
type = "model",
},
["src/Service/*.php"] = {
type = "service",
},
["tests/*Test.php"] = {
type = "test",
alternate = "src/{}.php",
},
},
["package.json"] = {
["src/*.ts"] = {
type = "source",
alternate = "tests/{}.test.ts",
},
["src/*.service.ts"] = {
type = "source",
alternate = "tests/{}.test.ts",
},
["tests/*.test.ts"] = {
type = "test",
alternate = "src/{}.ts",
},
},
}