diff --git a/config/neovim/after/plugin/projectionist.lua b/config/neovim/after/plugin/projectionist.lua new file mode 100644 index 00000000..681cf4b5 --- /dev/null +++ b/config/neovim/after/plugin/projectionist.lua @@ -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", + }, + }, +} diff --git a/system/shared/home-manager.nix b/system/shared/home-manager.nix index 1078226b..6ae83cdf 100644 --- a/system/shared/home-manager.nix +++ b/system/shared/home-manager.nix @@ -532,6 +532,7 @@ in vimPlugins.vim-obsession vimPlugins.vim-pasta vimPlugins.vim-polyglot + vimPlugins.vim-projectionist vimPlugins.vim-repeat vimPlugins.vim-sleuth vimPlugins.vim-sort-motion