Skip to content

Commit

Permalink
LazyVim 10.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-project committed Nov 19, 2023
1 parent ff3fe29 commit 5996572
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions lua/lazyvim/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ return {
hijack_netrw_behavior = "disabled",
components = {
icon = function(config, node, state)
local list = { "services", "utils", "util", "service", "config", "configs" }
local function isStringInList(str)
for _, listItem in ipairs(list) do
if string.lower(listItem) == string.lower(str) then
return true
end
end
return false
end

local highlights = require("neo-tree.ui.highlights")
local icon = config.default or " "
local padding = config.padding or " "
Expand All @@ -91,9 +101,17 @@ return {
if node.type == "directory" then
highlight = highlights.DIRECTORY_ICON
if node:is_expanded() then
icon = config.folder_open or "-"
if isStringInList(node.name) then
icon = ""
else
icon = config.folder_open or "-"
end
else
icon = config.folder_closed or "+"
if isStringInList(node.name) then
icon = ""
else
icon = config.folder_closed or "+"
end
end
elseif node.type == "file" then
local success, web_devicons = pcall(require, "nvim-web-devicons")
Expand Down

0 comments on commit 5996572

Please sign in to comment.