From 9cb67210b16b6bb0e3e29ab6bd3c21fd3a988b9b Mon Sep 17 00:00:00 2001 From: sloane <git@sloanelybutsurely.com> Date: Mon, 10 Mar 2025 15:15:07 -0400 Subject: [PATCH] install projectionist and dispatch, add basic elixir projections --- home-manager/nixvim/default.nix | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/home-manager/nixvim/default.nix b/home-manager/nixvim/default.nix index 1b62c80..6db95cb 100644 --- a/home-manager/nixvim/default.nix +++ b/home-manager/nixvim/default.nix @@ -2,7 +2,22 @@ programs.nixvim = { enable = true; - globals = { mapleader = " "; }; + globals = { + mapleader = " "; + projectionist_heuristics = { + "mix.exs" = { + "lib/*.ex" = { + type = "source"; + alternate = "test/{}_test.exs"; + }; + "test/*_test.exs" = { + type = "test"; + alternate = "lib/{}.ex"; + dispatch = "mix test {file}"; + }; + }; + }; + }; opts = { number = true; @@ -121,7 +136,14 @@ command = "lua vim.lsp.buf.format()"; }]; - extraPlugins = with pkgs.vimPlugins; [ vim-abolish nerdtree vim-rhubarb ]; + extraPlugins = with pkgs.vimPlugins; [ + vim-abolish + nerdtree + vim-rhubarb + vim-dispatch + vim-dispatch-neovim + vim-projectionist + ]; plugins.commentary.enable = true; plugins.repeat.enable = true;