Skip to content

Commit 14a20fa

Browse files
committed
feat(#192): :NvimWebDeviconsHiTest
1 parent dd7f743 commit 14a20fa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lua/nvim-web-devicons/hi-test.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ local function render_icons(bufnr, l, icons, header)
8888
return l
8989
end
9090

91+
---Create a buffer similar to :ru syntax/hitest.vim displaying each set icons
92+
---Icon, name, <tag>, concrete highlight definition
93+
---tag and header follows param
94+
---@param default_icon table no tag "Default"
95+
---@param icons_by_filename table[] filename "By File Name"
96+
---@param icons_by_file_extension table[] extension "By File Extension"
97+
---@param icons_by_operating_system table[] os "By Operating System"
9198
return function(default_icon, icons_by_filename, icons_by_file_extension, icons_by_operating_system)
9299
-- create a buffer
93100
local bufnr = vim.api.nvim_create_buf(false, true)
@@ -97,7 +104,7 @@ return function(default_icon, icons_by_filename, icons_by_file_extension, icons_
97104
l = render_icons(bufnr, l, { default_icon }, "Default")
98105
l = render_icons(bufnr, l, icons_by_filename, "By File Name")
99106
l = render_icons(bufnr, l, icons_by_file_extension, "By File Extension")
100-
l = render_icons(bufnr, l, icons_by_operating_system, "By Operating System")
107+
render_icons(bufnr, l, icons_by_operating_system, "By Operating System")
101108

102109
-- finalise and focus the buffer
103110
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)

0 commit comments

Comments
 (0)