lewis6991 / gitsigns.nvim

Git integration for buffers
MIT License
4.86k stars 186 forks source link

warning message might be better (from * 3d7e49c feat(config)!: deprecate highlight groups in config.signs) #1062

Closed greyHairChooseLife closed 2 months ago

greyHairChooseLife commented 2 months ago

Description

Please, don't get me wrong if this issue is not written politely enough. I am one of big fan of this project. But I am a newbie in English just like I am in vimmer.

About what

Last night, I got these warning message after updating plugins.

'signs.change.hl' is now deprecated, please define highlight 'GitSignsChange'
'signs.changedelete.hl' is now deprecated, please define highlight 'GitSignsChangedelete'
'signs.delete.hl' is now deprecated, please define highlight 'GitSignsDelete'

It breifly says I need to define some highlights. However, defining these one alone didn't resolve the warnings.

It also necessary to remove hl key from the plugin configuration:

require('gitsigns').setup({
  signs = {
    add          = { hl = 'DevIconQt', text = '+' },
    change       = { hl = 'DevIconGuix', text = '~' },

So what

I guess mentioning 'signs.change.hl' is clear enough within the context of this plugin or the vim-world. However, for someone like me, the waring could be more helpful.

I suggest adding a more detailed message or example, which would have saved me 15 minutes of confusion, and potentially help others as well.

Thank you for considering this suggestion.

Love,

Neovim version

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478

Operating system and version

OS: Manjaro Linux x86_64 Kernel: 6.1.92-1-MANJARO

Expected behavior

No response

Actual behavior

It is just suggestion about warning messages after * 3d7e49c

Minimal config

require('gitsigns').setup({
  signs = {
    add          = { hl = 'DevIconQt', text = '+' },
    change       = { hl = 'DevIconGuix', text = '~' },

Steps to reproduce

  1. mkdir gitsigns_issue
  2. cd gitsigns_issue
  3. git init
  4. touch file
  5. git add file
  6. git commit -m 'initial commit'
  7. nvim --clean -u minimal.lua file
  8. ...

Gitsigns debug messages

No response

Gitsigns cache

No response

lewis6991 commented 2 months ago

Will accept a PR.