From bac4bba01620ec1c3f14cab682974673767eea02 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Jun 2024 10:43:18 +0200 Subject: [PATCH] feat(bufferline): allow custom icons for filetypes --- lua/lazyvim/config/init.lua | 3 +++ lua/lazyvim/plugins/ui.lua | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5cd3283e..de41ec8c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -33,6 +33,9 @@ local defaults = { misc = { dots = "󰇘", }, + ft = { + octo = "", + }, dap = { Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, Breakpoint = " ", diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 5ef3405e..739ef1f1 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -92,6 +92,10 @@ return { text_align = "left", }, }, + ---@param opts bufferline.IconFetcherOpts + get_element_icon = function(opts) + return LazyVim.config.icons.ft[opts.filetype] + end, }, }, config = function(_, opts)