Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neogit integration update #545

Closed
fdelacruz opened this issue Jul 16, 2023 · 0 comments
Closed

neogit integration update #545

fdelacruz opened this issue Jul 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fdelacruz
Copy link
Contributor

fdelacruz commented Jul 16, 2023

Description

neogit added many new hl groups. Catppuccin doesn't yet support them. The integration file (neogit.lua) needs to be updated.

Neovim version

NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

Terminal and multiplexer

iTerm2

Catppuccin version / branch / rev

catppuccin e0dd3f9

Steps to reproduce

lvim -u repro.lua

Expected behavior

right colors
Screen Shot 2023-07-16 at 3 36 13 PM

Actual behavior

wrong colors
Screen Shot 2023-07-16 at 3 28 19 PM

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "catppuccin/nvim",
    name = "catppuccin",
    priority = 1000,
    config = function()
      require("catppuccin").setup {
        integrations = {
          neogit = false,
        },
      }
    end,
  },
  {
    "NeogitOrg/neogit",
    dependencies = {
      "nvim-lua/plenary.nvim",
      "sindrets/diffview.nvim",
    },
    cmd = { "Neogit" },
    config = function()
      require("neogit").setup {
        disable_signs = false,
        disable_hint = true,
        disable_context_highlighting = false,
        disable_commit_confirmation = true,
        -- Neogit refreshes its internal state after specific events, which can be expensive depending on the repository size.
        -- Disabling `auto_refresh` will make it so you have to manually refresh the status after you open it.
        auto_refresh = true,
        disable_builtin_notifications = false,
        use_magit_keybindings = false,
        -- Change the default way of opening neogit
        kind = "tab",
        -- Change the default way of opening the commit popup
        commit_popup = {
          kind = "split",
        },
        -- Change the default way of opening popups
        popup = {
          kind = "split",
        },
        -- customize displayed signs
        signs = {
          -- { CLOSED, OPENED }
          section = { ">", "v" },
          item = { ">", "v" },
          hunk = { "", "" },
        },
        integrations = {
          diffview = true,
        },
        -- Setting any section to `false` will make the section not render at all
        sections = {
          untracked = {
            folded = false,
          },
          unstaged = {
            folded = false,
          },
          staged = {
            folded = false,
          },
          stashes = {
            folded = true,
          },
          unpulled = {
            folded = true,
          },
          unmerged = {
            folded = false,
          },
          recent = {
            folded = true,
          },
        },
        -- override/add mappings
        mappings = {
          -- modify status buffer mappings
          status = {
            ["q"] = "Close",
            ["1"] = "Depth1",
            ["2"] = "Depth2",
            ["3"] = "Depth3",
            ["4"] = "Depth4",
            ["<tab>"] = "Toggle",
            ["x"] = "Discard",
            ["s"] = "Stage",
            ["a"] = "StageUnstaged",
            ["<c-s>"] = "StageAll",
            ["u"] = "Unstage",
            ["U"] = "UnstageStaged",
            ["d"] = "DiffAtFile",
            ["$"] = "CommandHistory",
            ["<c-r>"] = "RefreshBuffer",
            ["o"] = "GoToFile",
            ["<enter>"] = "Toggle",
            ["<c-v>"] = "VSplitOpen",
            ["<c-x>"] = "SplitOpen",
            ["<c-t>"] = "TabOpen",
            ["?"] = "HelpPopup",
            ["D"] = "DiffPopup",
            ["p"] = "PullPopup",
            ["r"] = "RebasePopup",
            ["P"] = "PushPopup",
            ["c"] = "CommitPopup",
            ["L"] = "LogPopup",
            ["Z"] = "StashPopup",
            ["b"] = "BranchPopup",
            -- ["<space>"] = "Stage",
            -- Removes the default mapping of "s"
            -- ["s"] = "",
          },
        },
      }
    end,
  },
  {
    "sindrets/diffview.nvim",
    cmd = { "DiffviewOpen" },
    enabled = true,
    config = true,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme "catppuccin"
-- add anything else here
@fdelacruz fdelacruz added the bug Something isn't working label Jul 16, 2023
fdelacruz added a commit to fdelacruz/catppuccin that referenced this issue Jul 17, 2023
fdelacruz added a commit to fdelacruz/catppuccin that referenced this issue Jul 17, 2023
fdelacruz added a commit to fdelacruz/catppuccin that referenced this issue Jul 18, 2023
fdelacruz added a commit to fdelacruz/catppuccin that referenced this issue Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant