From b72c1af17bedee9959b13c4f50a4797bfe525739 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Thu, 1 May 2025 19:12:50 +0800 Subject: [PATCH] feat nvim: add lazygit --- .../exact_plugins/exact_components/git.lua | 25 +++++++++++++++++++ .../exact_components/neo-tree.lua | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 dot_config/nvim/exact_lua/exact_plugins/exact_components/git.lua diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_components/git.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_components/git.lua new file mode 100644 index 0000000..c85a994 --- /dev/null +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_components/git.lua @@ -0,0 +1,25 @@ +return { + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-telescope/telescope.nvim", + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "", "LazyGit", desc = "LazyGit" }, + { "lg", "LazyGit", desc = "LazyGit" }, + }, + config = function() + require("telescope").load_extension("lazygit") + end, +} diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua index d44a347..021239f 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua @@ -72,7 +72,7 @@ return { { "fT", "Neotree float", desc = "NeoTree Float" }, { "fF", "Neotree filesystem float", desc = "NeoTree Filesystem Float" }, { "fG", "Neotree git_status float", desc = "NeoTree Git Status Float" }, - { "", "Neotree git_status float", desc = "NeoTree Git Status Float" }, + { "", "Neotree git_status float", desc = "NeoTree Git Status Float" }, --警告!在標準終端無法使用 { "fB", "Neotree buffers float", desc = "NeoTree Buffers Float" }, }, lazy = false,