Closed isaif closed 1 year ago
There is a line in "MacroRec" for showing an icon provider = " ", but it doesn't render.
provider = " "
Does this icon require some other patched font?
Here is minimal config using lazy.nvim:
local root = vim.fn.fnamemodify("./.repro", ":p") -- set stdpaths to use .repro for _, name in ipairs({ "config", "data", "state", "cache" }) do vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name end -- bootstrap lazy local lazypath = root .. "/plugins/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }) end vim.opt.runtimepath:prepend(lazypath) -- install plugins local plugins = { { "rebelot/heirline.nvim", dependencies = { "nvim-tree/nvim-web-devicons", }, init = function() vim.opt.cmdheight = 0 vim.opt.showcmdloc = "statusline" end, config = function() local heirline = require("heirline") local conditions = require("heirline.conditions") local utils = require("heirline.utils") local FileNameBlock = { init = function(self) self.filename = vim.api.nvim_buf_get_name(0) end, condition = conditions.buffer_not_empty, } local FileName = { provider = function(self) local filename = vim.fn.fnamemodify(self.filename, ":~:.") if filename == "" then return "[No Name]" end if not conditions.width_percent_below(#filename, 0.25) then filename = vim.fn.pathshorten(filename) end return filename end, } local FileFlags = { { condition = function() return vim.bo.modified end, provider = " [+] ", }, { condition = function() return not vim.bo.modifiable or vim.bo.readonly end, provider = "", }, } FileNameBlock = utils.insert(FileNameBlock, FileName, unpack(FileFlags), { provider = "%< " }) local MacroRec = { condition = function() return vim.fn.reg_recording() ~= "" and vim.o.cmdheight == 0 end, provider = " ", hl = { fg = "orange", bold = true }, utils.surround({ "[", "]" }, nil, { provider = function() return vim.fn.reg_recording() end, hl = { fg = "green", bold = true }, }), update = { "RecordingEnter", "RecordingLeave", }, } local StatusLine = { MacroRec, FileNameBlock, } heirline.setup({ statusline = StatusLine }) end, }, } require("lazy").setup(plugins, { root = root .. "/plugins", })
I know that it can be changed to something else but I thought I should share it with you.
The issue was the prebuilt fonts from https://www.nerdfonts.com/ are not patched with all the latest codicons set.
There is a line in "MacroRec" for showing an icon
provider = " "
, but it doesn't render.Does this icon require some other patched font?
Here is minimal config using lazy.nvim:
I know that it can be changed to something else but I thought I should share it with you.