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

staged changes do not use the signs used in config #1076

Closed
matthis-k opened this issue Jul 1, 2024 · 1 comment
Closed

staged changes do not use the signs used in config #1076

matthis-k opened this issue Jul 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@matthis-k
Copy link

Description

when staging changes the signs used are the default ones

Neovim version

0.10

Operating system and version

nixos

Expected behavior

use the signs specified in the config

Actual behavior

image

the git diff inside this repo:

diff --git a/home-manager/nvim/config/lua/plugins/ui/gitsigns.lua b/home-manager/nvim/config/lua/plugins/ui/gitsigns.lua
index 819273b..f9c08c7 100644
--- a/home-manager/nvim/config/lua/plugins/ui/gitsigns.lua
+++ b/home-manager/nvim/config/lua/plugins/ui/gitsigns.lua
@@ -18,9 +18,9 @@ return {
         },
         opts = {
             signs = {
-                add = { text = " a" },
-                change = { text = " c" },
-                delete = { text = " d" },
+                add = { text = " A" },
+                change = { text = " C" },
+                delete = { text = " D" },
                 topdelete = { text = " t" },
                 changedelete = { text = " C" },
                 untracked = { text = " u" },

Minimal config

for name, url in pairs {
    gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
    -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} do
    local install_path = vim.fn.fnamemodify('gitsigns_issue/' .. name, ':p')
    if vim.fn.isdirectory(install_path) == 0 then
        vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
    end
    vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup {
    debug_mode = true, -- You must add this to enable debug messages
    signs = {
        add = { text = " a" },
        change = { text = " c" },
        delete = { text = " d" },
        topdelete = { text = " t" },
        changedelete = { text = " C" },
        untracked = { text = " u" },
    },
    signcolumn = true,
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

  1. mkdir gitsigns_issue
  2. cd gitsigns_issue
  3. git init
  4. echo line 1\nline 2\nline 3\nline 4 > file
  5. git add file
  6. nvim --clean -u minimal.lua file

Gitsigns debug messages

No response

Gitsigns cache

No response

@matthis-k matthis-k added the bug Something isn't working label Jul 1, 2024
@lewis6991
Copy link
Owner

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

2 participants