Skip to content

Commit

Permalink
fix(icons): display overriden devicons (#817)
Browse files Browse the repository at this point in the history
normally bufferline retrieves the file extension using vim.fn.fnamemodify with the :e option, but that doesn't account for extensions with multiple dots, by passing nil instead of that extension, the inner recursive mechanism of nvim-web-devicons is utilized to get the longest matching extension from the filename
  • Loading branch information
scianek authored Sep 19, 2023
1 parent 9961d87 commit 81cd04f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/bufferline/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function M.get_icon(opts)
end
if type == "terminal" then return webdev_icons.get_icon(type) end

local icon, hl = webdev_icons.get_icon(fn.fnamemodify(opts.path, ":t"), opts.extension, {
local icon, hl = webdev_icons.get_icon(fn.fnamemodify(opts.path, ":t"), nil, {
default = true,
})

Expand Down

0 comments on commit 81cd04f

Please sign in to comment.