diff --git a/lua/astrocommunity/git/diffview-nvim/init.lua b/lua/astrocommunity/git/diffview-nvim/init.lua index 760a72bb3..45a1f0375 100644 --- a/lua/astrocommunity/git/diffview-nvim/init.lua +++ b/lua/astrocommunity/git/diffview-nvim/init.lua @@ -1,5 +1,12 @@ return { - "sindrets/diffview.nvim", - event = "User AstroGitFile", - cmd = { "DiffviewOpen" }, + { + "sindrets/diffview.nvim", + event = "User AstroGitFile", + cmd = { "DiffviewOpen" }, + }, + { + "NeogitOrg/neogit", + optional = true, + opts = { integrations = { diffview = true } }, + }, } diff --git a/lua/astrocommunity/git/neogit/init.lua b/lua/astrocommunity/git/neogit/init.lua index f72104bf0..b694e5561 100644 --- a/lua/astrocommunity/git/neogit/init.lua +++ b/lua/astrocommunity/git/neogit/init.lua @@ -1,8 +1,9 @@ +local utils = require "astronvim.utils" local prefix = "g" -local maps = { n = {} } local icon = vim.g.icons_enabled and "󰰔 " or "" -maps.n[prefix] = { desc = icon .. "Neogit" } -require("astronvim.utils").set_mappings(maps) +utils.set_mappings { n = { [prefix] = { desc = icon .. "Neogit" } } } + +local fold_signs = { utils.get_icon "FoldClosed", utils.get_icon "FoldOpened" } return { { "NeogitOrg/neogit", @@ -10,7 +11,18 @@ return { { "nvim-lua/plenary.nvim" }, }, event = "User AstroGitFile", - opts = {}, + opts = function(_, opts) + return utils.extend_tbl(opts, { + disable_builtin_notifications = utils.is_available "nvim-notify", + telescope_sorter = function() + if utils.is_available "telescope-fzf-native.nvim" then + return require("telescope").extensions.fzf.native_fzf_sorter() + end + end, + integrations = { telescope = utils.is_available "telescope.nvim" }, + signs = { section = fold_signs, item = fold_signs }, + }) + end, keys = { { prefix .. "nt", "Neogit", desc = "Open Neogit Tab Page" }, { prefix .. "nc", "Neogit commit", desc = "Open Neogit Commit Page" }, @@ -18,4 +30,9 @@ return { { prefix .. "nk", ":Neogit kind=", desc = "Open Neogit Override Kind" }, }, }, + { + "catppuccin/nvim", + optional = true, + opts = { integrations = { neogit = true } }, + }, } diff --git a/lua/astrocommunity/utility/telescope-fzy-native-nvim/init.lua b/lua/astrocommunity/utility/telescope-fzy-native-nvim/init.lua index 910b02c6d..e3350357d 100644 --- a/lua/astrocommunity/utility/telescope-fzy-native-nvim/init.lua +++ b/lua/astrocommunity/utility/telescope-fzy-native-nvim/init.lua @@ -1,5 +1,12 @@ return { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-telescope/telescope-fzy-native.nvim" }, - opts = function() require("telescope").load_extension "fzy_native" end, + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-telescope/telescope-fzy-native.nvim" }, + opts = function() require("telescope").load_extension "fzy_native" end, + }, + { + "NeogitOrg/neogit", + optional = true, + opts = { telescope_sorter = function() return require("telescope").extensions.fzy_native.native_fzy_sorter() end }, + }, }