Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Auto re-highlight does not respect defined legacy highlight groups if new ones are default-linked.

Geschlossen
#3,359 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Ein zugehöriger Pull Request wurde bereits gemerged.

  • #3360 von @xsbsy-hzbyp — gemerged

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
70/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
lua
Bereich
tooling

Rechercherichtung

Start in lua/nvim-tree/appearance/init.lua around the linked re-highlight logic at line 198, and read how highlight groups are checked and linked. Verify the behavior with a defined legacy group and a new group retaining only its default link. Done means re-highlighting respects the legacy definition in that case without changing existing behavior for explicitly defined new groups.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug reproduced
Description

If we have previously highlight default-ed a highlight group, then even after highlight clear, the current re-highlight logic would not respect legacy highlights even if they are defined, so for example, even if a colorscheme has a definition for NvimTreeGitNew, after our autocmd is run, NvimTreeGitNewIcon still links to PreProc.

Currently we only link to a legacy group if the new group is not defined and the legacy group is defined. Should we change it to "if the new group is not defined or is defined but has only the default link"?

Neovim version
NVIM v0.12.5
Operating system and version

Linux

Windows variant

No response

nvim-tree version

master

Clean room replication
none
Steps to reproduce

none

Expected behavior

No response

Actual behavior

No response

Vorherrschende Sprache
Lua
Sterne
8.7k
Forks
642
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nvim-tree/nvim-tree.lua

Alle Issues in nvim-tree/nvim-tree.lua

Ähnliche Issues

Weitere Issues zu Lua

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.