Skip to content

Commit 82e1ac8

Browse files
committed
colors.lua -> appearance.lua
1 parent 6029bcd commit 82e1ac8

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

lua/nvim-tree.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local lib = require "nvim-tree.lib"
22
local log = require "nvim-tree.log"
3-
local colors = require "nvim-tree.colors"
3+
local appearance = require "nvim-tree.appearance"
44
local renderer = require "nvim-tree.renderer"
55
local view = require "nvim-tree.view"
66
local commands = require "nvim-tree.commands"
@@ -162,10 +162,10 @@ local function setup_autocommands(opts)
162162
vim.api.nvim_create_autocmd(name, vim.tbl_extend("force", default_opts, custom_opts))
163163
end
164164

165-
-- reset and draw highlights when colorscheme is changed
166-
create_nvim_tree_autocmd("ColorScheme", {
165+
-- reset and draw highlights when appearancecheme is changed
166+
create_nvim_tree_autocmd("appearancecheme", {
167167
callback = function()
168-
colors.setup()
168+
appearance.setup()
169169
renderer.render_hl(view.get_bufnr())
170170
end,
171171
})
@@ -787,7 +787,7 @@ function M.setup(conf)
787787

788788
require("nvim-tree.actions").setup(opts)
789789
require("nvim-tree.keymap").setup(opts)
790-
require("nvim-tree.colors").setup()
790+
require("nvim-tree.appearance").setup()
791791
require("nvim-tree.diagnostics").setup(opts)
792792
require("nvim-tree.explorer").setup(opts)
793793
require("nvim-tree.git").setup(opts)
File renamed without changes.

lua/nvim-tree/renderer/builder.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local colors = require "nvim-tree.colors"
1+
local appearance = require "nvim-tree.appearance"
22
local utils = require "nvim-tree.utils"
33
local notify = require "nvim-tree.notify"
44

@@ -283,8 +283,8 @@ function Builder:_create_combined_group(groups)
283283
end
284284

285285
-- highlight directly in the namespace
286-
vim.api.nvim_set_hl_ns_fast(colors.NS_ID)
287-
vim.api.nvim_set_hl(colors.NS_ID, combined_name, combined_hl)
286+
vim.api.nvim_set_hl_ns_fast(appearance.NS_ID)
287+
vim.api.nvim_set_hl(appearance.NS_ID, combined_name, combined_hl)
288288

289289
table.insert(self.combined_groups, combined_name)
290290
end

lua/nvim-tree/renderer/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local colors = require "nvim-tree.colors"
1+
local appearance = require "nvim-tree.appearance"
22
local core = require "nvim-tree.core"
33
local log = require "nvim-tree.log"
44
local view = require "nvim-tree.view"
@@ -40,11 +40,11 @@ function M.render_hl(bufnr, hl)
4040
if not bufnr or not vim.api.nvim_buf_is_loaded(bufnr) then
4141
return
4242
end
43-
vim.api.nvim_buf_clear_namespace(bufnr, colors.NS_ID, 0, -1)
43+
vim.api.nvim_buf_clear_namespace(bufnr, appearance.NS_ID, 0, -1)
4444
for _, data in ipairs(hl or M.last_highlights) do
4545
if type(data[1]) == "table" then
4646
for _, group in ipairs(data[1]) do
47-
vim.api.nvim_buf_add_highlight(bufnr, colors.NS_ID, group, data[2], data[3], data[4])
47+
vim.api.nvim_buf_add_highlight(bufnr, appearance.NS_ID, group, data[2], data[3], data[4])
4848
end
4949
end
5050
end

lua/nvim-tree/view.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local colors = require "nvim-tree.colors"
1+
local appearance = require "nvim-tree.appearance"
22
local events = require "nvim-tree.events"
33
local utils = require "nvim-tree.utils"
44
local log = require "nvim-tree.log"
@@ -135,7 +135,7 @@ local function set_window_options_and_buffer()
135135
vim.opt_local[k] = v
136136
end
137137
vim.opt.eventignore = eventignore
138-
vim.api.nvim_win_set_hl_ns(0, colors.NS_ID)
138+
vim.api.nvim_win_set_hl_ns(0, appearance.NS_ID)
139139
end
140140

141141
---@return table

0 commit comments

Comments
 (0)