diff --git a/config/plugins/default.nix b/config/plugins/default.nix index 4ce12b4..b38b731 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -6,7 +6,9 @@ ./coq ./conform-nvim.nix ./flash.nix + ./firenvim.nix + ./fugitive.nix ./gitsigns.nix ./lsp ./lspkind.nix @@ -57,11 +59,6 @@ # https://nix-community.github.io/nixvim/plugins/friendly-snippets friendly-snippets.enable = true; - # unstoppable git plugin - # https://github.com/tpope/vim-fugitive/ - # https://nix-community.github.io/nixvim/plugins/fugitive - fugitive.enable = true; - # adds syntax highlighting and special helpers for nix files # https://github.com/LnL7/vim-nix/ # https://nix-community.github.io/nixvim/plugins/nix diff --git a/config/plugins/fugitive.nix b/config/plugins/fugitive.nix new file mode 100644 index 0000000..d23e057 --- /dev/null +++ b/config/plugins/fugitive.nix @@ -0,0 +1,19 @@ +{ ... }: +{ + config = { + extraConfigLua = # lua + '' + vim.keymap.set('n', 'g', function() + if vim.fn.exists(':Git') > 0 then -- Ensure :Git command is available + vim.cmd('Git') -- Call :Git command + else + vim.notify('vim-fugitive is not loaded', vim.log.levels.ERROR) + end + end, { desc = "Git" }) + ''; + # unstoppable git plugin + # https://github.com/tpope/vim-fugitive/ + # https://nix-community.github.io/nixvim/plugins/fugitive + plugins.fugitive.enable = true; + }; +}