Skip to content

Commit

Permalink
fix(neogit): move check into code rather than docs (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacro authored Aug 2, 2023
1 parent f1a7894 commit e365cdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
22 changes: 0 additions & 22 deletions lua/astrocommunity/git/neogit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,3 @@ magit for neovim

A work-in-progress Magit clone for Neovim that is geared toward the Vim philosophy.


## Noice notification support

Neogit configuration checks if "nvim-notify" is available, otherwise disables Neogit notifications

When using noice, add an override to check for "noice-nvim"

```lua
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.git.neogit" },
{
"NeogitOrg/neogit",
dependencies = {
{ "nvim-lua/plenary.nvim", "sindrets/diffview.nvim" },
},
opts = {
-- disable_builtin_notifications = false,
disable_builtin_notifications = utils.is_available "noice-nvim",
},
},
```
4 changes: 3 additions & 1 deletion lua/astrocommunity/git/neogit/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ return {
},
event = "User AstroGitFile",
opts = function(_, opts)
local disable_builtin_notifications = utils.is_available "nvim-notify" or utils.is_available "noice.nvim"

return utils.extend_tbl(opts, {
disable_builtin_notifications = utils.is_available "nvim-notify",
disable_builtin_notifications = disable_builtin_notifications,
telescope_sorter = function()
if utils.is_available "telescope-fzf-native.nvim" then
return require("telescope").extensions.fzf.native_fzf_sorter()
Expand Down

0 comments on commit e365cdf

Please sign in to comment.