Skip to content

Diagnostics Info icon highlight group is incorrect: Expected "NvimTreeLspDiagnosticsInfo" but found "NvimTreeLspDiagnosticsInformation" #2516

Closed
@juhaku

Description

@juhaku

Description

The diagnostics highlight group used for info icon is incorrect. NvimTree has set following highlight groups:

NvimTreeLspDiagnosticsWarningFolderText xxx links to NvimTreeLspDiagnosticsWarningText
NvimTreeLspDiagnosticsWarningText xxx links to NvimTreeLspDiagnosticsWarning
NvimTreeLspDiagnosticsErrorFolderText xxx links to NvimTreeLspDiagnosticsErrorText
NvimTreeLspDiagnosticsErrorText xxx links to NvimTreeLspDiagnosticsError
NvimTreeLspDiagnosticsInformation xxx links to DiagnosticInfo
...
NvimTreeLspDiagnosticsWarning xxx links to DiagnosticWarn
NvimTreeLspDiagnosticsError xxx links to DiagnosticError
NvimTreeLspDiagnosticsHint xxx links to DiagnosticHint

However the highlight group wanted for the info icon is NvimTreeLspDiagnosticsInfo as defined here:

M.ICON[vim.diagnostic.severity.INFO] = {
str = M.config.diagnostics.icons.info,
hl = { "NvimTreeLspDiagnosticsInfo" },
}
.

I assume the highlight group should be renamed to *Information or the NvimTree highlight groups should be corrected with *Info

Neovim version

NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1694285958

Operating system and version

Linux 6.1.55-1-MANJARO

Windows variant

No response

nvim-tree version

master

Clean room replication

require("nvim-tree").setup({
	reload_on_bufenter = true,
	select_prompts = true,
	hijack_netrw = false,
	view = {
		width = 50,
	},
	renderer = {
		root_folder_label = ":~:s?$?/?",
		special_files = {},
		highlight_git = true,
		highlight_diagnostics = true,
		highlight_modified = "all",
		indent_markers = {
			enable = true,
		},
		icons = {
			show = {
				folder_arrow = true,
			},
		},
	},
	modified = {
		enable = true,
		show_on_dirs = true,
		show_on_open_dirs = true,
	},
	hijack_directories = {
		enable = false,
		auto_open = true,
	},
	update_focused_file = {
		enable = true,
	},
	diagnostics = {
		enable = true,
		show_on_dirs = true,
		show_on_open_dirs = true,
		debounce_delay = 50,
		icons = {
			hint = "",
			info = "",
			warning = "",
			error = "",
		},
	},
	filters = {
		git_ignored = true,
		dotfiles = true,
		git_clean = false,
		no_buffer = false,
		custom = {},
		exclude = {
			"node_modules",
		},
	},
	actions = {
		expand_all = {
			exclude = {
				"node_modules",
				"target",
				"build",
				".git",
			},
		},
	},
	tab = {
		sync = {
			open = true,
			close = true,
			ignore = {},
		},
	},
})

Steps to reproduce

  1. Open nvim with diagnostic enabled workspace (literally any project will do)
  2. Open nvim-tree and a file that has info level diagnostics available
  3. See results on the nvim-tree the icon color is not highlighted correctly but remains grey color.

Expected behavior

Should highlight color the icon according to used color theme:
image

Actual behavior

But the color remains grey:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreproducedIssue confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions