refactor(#2826): move all winhl to appearance constants

This commit is contained in:
Alexander Courtis
2025-06-16 13:00:33 +10:00
parent 76186fa64b
commit 5377a3fd69
4 changed files with 32 additions and 26 deletions

View File

@@ -1,3 +1,4 @@
local appearance = require("nvim-tree.appearance")
local keymap = require("nvim-tree.keymap")
local api = {} -- circular dependency
@@ -5,12 +6,6 @@ local PAT_MOUSE = "^<.*Mouse"
local PAT_CTRL = "^<C%-"
local PAT_SPECIAL = "^<.+"
local WIN_HL = table.concat({
"NormalFloat:NvimTreeNormalFloat",
"WinSeparator:NvimTreeWinSeparator",
"CursorLine:NvimTreeCursorLine",
}, ",")
local namespace_help_id = vim.api.nvim_create_namespace("NvimTreeHelp")
local M = {
@@ -210,7 +205,7 @@ local function open()
})
-- style it a bit like the tree
vim.wo[M.winnr].winhl = WIN_HL
vim.wo[M.winnr].winhl = appearance.WIN_HL_HELP
vim.wo[M.winnr].cursorline = M.config.cursorline
local function toggle_sort()