🪴 a tiny, customizable statusline for neovim
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf: use lazy require in init

robin 01b44432 0e0a110a

+15 -4
+15 -4
lua/lylla/init.lua
··· 1 1 local M = {} 2 2 3 + local lzrq = function(modname) 4 + return setmetatable({ 5 + modname = modname, 6 + }, { 7 + __index = function(t, k) 8 + local m = rawget(t, "modname") 9 + return m and require(m)[k] or nil 10 + end, 11 + }) 12 + end 13 + 14 + local config = lzrq("lylla.config") 15 + local utils = lzrq("lylla.utils") 16 + 3 17 ---@type table<'normal'|'visual'|'command'|'insert', vim.api.keyset.highlight> 4 18 local default_hls = { 5 19 normal = { link = "MiniIconsAzure" }, ··· 11 25 ---@param cfg? lylla.config 12 26 function M.setup(cfg) 13 27 cfg = cfg or {} 14 - local config = require("lylla.config") 15 28 config.set(config.override(cfg)) 16 29 end 17 30 18 31 function M.inithls() 19 - local utils = require("lylla.utils") 20 32 vim.iter(pairs(default_hls)):each(function(mode, defaulthl) 21 33 local name = utils.get_modehl_name(mode) 22 34 23 - local hl = require("lylla.config").get().hls[mode] 35 + local hl = config.get().hls[mode] 24 36 if hl then 25 37 vim.api.nvim_set_hl(0, name, hl) 26 38 return ··· 33 45 end 34 46 35 47 function M.resethl() 36 - local utils = require("lylla.utils") 37 48 vim.iter(pairs(default_hls)):each(function(mode, _) 38 49 local name = utils.get_modehl_name(mode) 39 50 vim.api.nvim_set_hl(0, name, {})