benbrastmckie / .config

NeoVim configuration optimized for writing in LaTeX
340 stars 287 forks source link

Deprecated and invalid configuration in GitSigns #125

Closed rafisics closed 5 months ago

rafisics commented 5 months ago

I am getting the following issue with GitSigns:

'signs.add.hl' is now deprecated, please define highlight 'GitSignsAdd'
'signs.add.linehl' is now deprecated, please define highlight 'GitSignsAddLn'                                                                          
'signs.add.numhl' is now deprecated, please define highlight 'GitSignsAddNr'                                                                           
'signs.change.hl' is now deprecated, please define highlight 'GitSignsChange'                                                                          
'signs.change.linehl' is now deprecated, please define highlight 'GitSignsChangeLn'                                                                    
'signs.change.numhl' is now deprecated, please define highlight 'GitSignsChangeNr'                                                                     
'signs.changedelete.hl' is now deprecated, please define highlight 'GitSignsChangedelete'                                                              
'signs.changedelete.linehl' is now deprecated, please define highlight 'GitSignsChangedeleteLn'                                                        
'signs.changedelete.numhl' is now deprecated, please define highlight 'GitSignsChangedeleteNr'                                                         
'signs.delete.hl' is now deprecated, please define highlight 'GitSignsDelete'                                                                          
'signs.delete.linehl' is now deprecated, please define highlight 'GitSignsDeleteLn'                                                                    
'signs.delete.numhl' is now deprecated, please define highlight 'GitSignsDeleteNr'                                                                     
'signs.topdelete.hl' is now deprecated, please define highlight 'GitSignsTopdelete'                                                                    
'signs.topdelete.linehl' is now deprecated, please define highlight 'GitSignsTopdeleteLn'                                                              
'signs.topdelete.numhl' is now deprecated, please define highlight 'GitSignsTopdeleteNr'                                                               
gitsigns: Ignoring invalid configuration field 'current_line_blame_formatter_opts'                                                                     
gitsigns: Ignoring invalid configuration field 'yadm'                                                                                                  
Press ENTER or type command to continue        

my nvim version

NVIM v0.10.0
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
benbrastmckie commented 5 months ago

Looks like there is an issue open on GitSigns. I'm still using v0.9.5 since I'm on NixOS stable.

You could also try adding or changing highlight groups in gitsigns.lua in the config to look more like the config here. To find highlight groups that are already defined, you can type the command highlight followed by nothing or the highlight group you are looking for. It should autocomplete to make searching easy.

Hope that helps! If you figure it out or run into further problems, it would be great to document here for others.

benbrastmckie commented 5 months ago

I believe I fixed the problem with the most recent commit. Or you can cut and paste the following into gitsigns.lua:

      signs = {
        add = { text = "▎" },
        change = { text = "▎" },
        delete = { text = "▎" },
        topdelete = { text = "▎" },
        changedelete = { text = "▎" },
      },

I also commented out the following:

      -- current_line_blame_formatter_opts = {
      --   relative_time = false,
      -- },
...
      -- yadm = {
      --   enable = false,
      -- },

Let me know if that does the trick.

rafisics commented 5 months ago

Yes, it solves the issue. Thank you.