Fixed neogit fold issues
This commit is contained in:
parent
50668b54d7
commit
32d83e44ce
|
@ -200,23 +200,6 @@ return {
|
|||
keys = "<leader>yg",
|
||||
},
|
||||
|
||||
{
|
||||
-- magit clone
|
||||
"TimUntersberger/neogit",
|
||||
-- dependencies = { "plenary.nvim" },
|
||||
cmd = "Neogit",
|
||||
enabled = env.firenvim.not_active() and env.vscode.not_active(),
|
||||
init = function()
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<C-g>",
|
||||
"<cmd>Neogit<cr>",
|
||||
{ desc = "Open neo[g]it" }
|
||||
)
|
||||
end,
|
||||
config = true,
|
||||
},
|
||||
|
||||
{
|
||||
-- discord rich presence
|
||||
"andweeb/presence.nvim",
|
||||
|
|
28
dotfiles/neovim/lua/my/plugins/neogit.lua
Normal file
28
dotfiles/neovim/lua/my/plugins/neogit.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
local env = require("my.helpers.env")
|
||||
|
||||
local M = {
|
||||
"TimUntersberger/neogit",
|
||||
|
||||
-- dependencies = { "plenary.nvim" },
|
||||
|
||||
cmd = "Neogit",
|
||||
enabled = env.firenvim.not_active() and env.vscode.not_active(),
|
||||
init = function()
|
||||
vim.keymap.set("n", "<C-g>", "<cmd>Neogit<cr>", { desc = "Open neo[g]it" })
|
||||
end,
|
||||
config = function()
|
||||
require("neogit").setup()
|
||||
|
||||
-- {{{ Disable folds inside neogit
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "NeogitStatus" },
|
||||
group = vim.api.nvim_create_augroup("NeogitStatusOptions", {}),
|
||||
callback = function()
|
||||
vim.opt.foldenable = false
|
||||
end,
|
||||
})
|
||||
-- }}}
|
||||
end,
|
||||
}
|
||||
|
||||
return M
|
Loading…
Reference in a new issue