fix(nvim-tree): disable hl groups in onedark instead
This commit is contained in:
@@ -1,39 +1,3 @@
|
||||
local util = require("util")
|
||||
|
||||
local function override_highlights()
|
||||
-- File Icon
|
||||
local hl = util.get_hl_source("NvimTreeFileIcon")
|
||||
vim.api.nvim_set_hl(0, "NvimTreeFileIcon", { fg = hl.fg, bg = nil })
|
||||
|
||||
-- Symlink Icon
|
||||
hl = util.get_hl_source("NvimTreeSymlinkIcon")
|
||||
vim.api.nvim_set_hl(0, "NvimTreeSymlinkIcon", { fg = hl.fg, bg = nil })
|
||||
end
|
||||
|
||||
local function disable_highlights()
|
||||
-- File types
|
||||
vim.cmd.highlight({ "clear NvimTreeExecFile" })
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeExecFile NONE",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({ "clear NvimTreeImageFile" })
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeImageFile NONE",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({ "clear NvimTreeSpecialFile" })
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeSpecialFile NONE",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({ "clear NvimTreeSymlink" })
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeSymlink NONE",
|
||||
bang = true,
|
||||
})
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", function()
|
||||
require("nvim-tree.api").tree.toggle({ find_file = true, focus = false })
|
||||
end)
|
||||
@@ -264,9 +228,6 @@ require("nvim-tree").setup({
|
||||
},
|
||||
})
|
||||
|
||||
override_highlights()
|
||||
disable_highlights()
|
||||
|
||||
vim.api.nvim_create_autocmd("QuitPre", {
|
||||
callback = function()
|
||||
local tree_wins = {}
|
||||
|
||||
+4
-1
@@ -44,7 +44,10 @@ local highlights = {
|
||||
TabLineSel = { fg = c.fg, bg = c.bg2 },
|
||||
TabLineFill = { bg = c.bg1 },
|
||||
EndOfBuffer = { fg = "NONE", bg = "NONE" },
|
||||
NvimTreeIndentMarker = { fg = c.bg3 },
|
||||
NvimTreeExecFile = { fg = "NONE", bg = "NONE" },
|
||||
NvimTreeSpecialFile = { fg = "NONE", bg = "NONE" },
|
||||
NvimTreeSymlink = { fg = "NONE", bg = "NONE" },
|
||||
NvimTreeImageFile = { fg = "NONE", bg = "NONE" },
|
||||
TelescopeNormal = { bg = c.bg_d },
|
||||
TelescopeTitle = { fg = c.orange, bg = c.bg_d },
|
||||
TelescopePromptBorder = { fg = c.grey, bg = c.bg_d },
|
||||
|
||||
Reference in New Issue
Block a user