Remove unused plugins

This commit is contained in:
Oliver Davies 2025-05-19 08:29:12 +01:00
parent 24fc8e6845
commit 935c099c31
3 changed files with 0 additions and 81 deletions

View file

@ -1,54 +0,0 @@
vim.fn["edit_alternate#rule#add"]("php", function(filename)
if filename:find "Test.php$" then
filename = filename:gsub("Test.php$", ".php")
if filename:find "tests/src/" then
-- Drupal tests. Remove the `src/{type}` from the path.
return filename:gsub("tests/src/(.-)/", "src/")
else
return filename:gsub("tests/", "src/")
end
else
filename = filename:gsub(".php$", "Test.php")
if filename:find "modules/custom" then
-- Drupal test types.
local test_types = { "Functional", "FunctionalJavaScript", "Kernel", "Unit" }
for _, test_type in ipairs(test_types) do
local filename_with_test_type = filename:gsub("src/", string.format("tests/src/%s/", test_type))
-- Return the first matching test file that exists.
if vim.fn.filereadable(filename_with_test_type) == 1 then
return filename_with_test_type
end
end
end
end
end)
if vim.fn.filereadable "composer.json" == 1 then
vim.fn["edit_alternate#rule#add"]("json", function(filename)
if filename:find "composer.json" then
return (filename:gsub("%.json$", ".lock"))
end
end)
vim.fn["edit_alternate#rule#add"]("lock", function(filename)
if filename:find "composer.lock" then
return (filename:gsub("%.lock$", ".json"))
end
end)
end
if vim.fn.filereadable "fractal.config.js" == 1 then
vim.fn["edit_alternate#rule#add"]("twig", function(filename)
return (filename:gsub("%.twig$", ".config.yml"))
end)
vim.fn["edit_alternate#rule#add"]("yml", function(filename)
return (filename:gsub("%.config.yml$", ".twig"))
end)
end
vim.keymap.set("n", "<leader>ea", "<CMD>EditAlternate<CR>", { silent = true })

View file

@ -24,8 +24,6 @@ in
plugins = with pkgs.vimPlugins; [
comment-nvim
conf-vim
edit-alternate-vim
gitsigns-nvim
harpoon2
mini-nvim
@ -33,7 +31,6 @@ in
oil-nvim
phpactor
refactoring-nvim
standard-vim
undotree
vim-nix
vim-pasta

View file

@ -1,28 +1,4 @@
{
"conf-vim": {
"owner": "tjdevries",
"repo": "conf.vim",
"rev": "a716df0fd5d7ba558c07dac2e07f05d5eba11afb",
"version": "unstable-2017-10-09",
"hash": "sha256-AjiTJsoim0BAnyfqk1IQzNsa6jhFM2+A66E7q9sJqz0="
},
"edit-alternate-vim": {
"owner": "tjdevries",
"repo": "edit_alternate.vim",
"rev": "ef3019115d9bb7ffd691d2859eda213dd99e0b0a",
"version": "unstable-2021-10-25",
"hash": "sha256-mEKnqYAhgrdxPRoKf4S4yYecdFIHGg8bDxpqPuC1+S4="
},
"standard-vim": {
"owner": "tjdevries",
"repo": "standard.vim",
"rev": "b333ef9a9cf6cf66536deda017a542843613fa75",
"version": "unstable-2018-10-15",
"hash": "sha256-9VwkvV1Dv6cE4uDkPp36DozjWJOclDR883yDMYw000E="
},
"vim-textobj-indent": {
"owner": "kana",
"repo": "vim-textobj-indent",