Skip to content

Commit 8760d76

Browse files
committed
chore: enable missing-local-export-doc
1 parent 077af9f commit 8760d76

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

Diff for: .luarc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"lowercase-global": "Any",
4040
"missing-fields": "Any",
4141
"missing-global-doc": "Any",
42-
"missing-local-export-doc": "None",
42+
"missing-local-export-doc": "Any",
4343
"missing-parameter": "Any",
4444
"missing-return": "Any",
4545
"missing-return-value": "Any",

Diff for: lua/nvim-tree/renderer/components/icons.lua

+18-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ local function config_symlinks()
55
M.i.symlink_arrow = M.config.symlink_arrow
66
end
77

8+
---@return string icon
9+
---@return string? name
810
local function empty()
9-
return ""
11+
return "", nil
1012
end
1113

14+
---@param node Node
15+
---@param has_children boolean
16+
---@return string icon
17+
---@return string? name
1218
local function get_folder_icon_default(node, has_children)
1319
local is_symlink = node.links_to ~= nil
1420
local n
@@ -32,6 +38,10 @@ local function get_folder_icon_default(node, has_children)
3238
return n, nil
3339
end
3440

41+
---@param node Node
42+
---@param has_children boolean
43+
---@return string icon
44+
---@return string? name
3545
local function get_folder_icon_webdev(node, has_children)
3646
local icon, hl_group = M.devicons.get_icon(node.name, node.extension)
3747
if not M.config.web_devicons.folder.color then
@@ -44,16 +54,22 @@ local function get_folder_icon_webdev(node, has_children)
4454
end
4555
end
4656

57+
---@return string icon
58+
---@return string? name
4759
local function get_file_icon_default()
4860
local hl_group = "NvimTreeFileIcon"
4961
local icon = M.config.glyphs.default
5062
if #icon > 0 then
5163
return icon, hl_group
5264
else
53-
return ""
65+
return "", nil
5466
end
5567
end
5668

69+
---@param fname string
70+
---@param extension string
71+
---@return string icon
72+
---@return string? name
5773
local function get_file_icon_webdev(fname, extension)
5874
local icon, hl_group = M.devicons.get_icon(fname, extension)
5975
if not M.config.web_devicons.file.color then

0 commit comments

Comments
 (0)