(import-macros {: setl!} :nvrc.macro.set) (import-macros {: ag! : au!} :nvrc.macro.event) (local {: diagnostics} (require :nvrc.ui.modules.diagnostics)) (global statusline {}) (set statusline.enable (fn [] (table.concat ["%#StatusLineAccent#" "▊ " "%#StatusLine#" "%#StatusLineAccentBold#" "%f%m%r " "%#StatusLine#" "%l:%c | " (diagnostics) "%=" "%#StatusLineAccentBold#" "%y *%n "]))) (ag! ui-statusline (au! [WinEnter BufEnter] * #(setl! statusline "%!v:lua.statusline.enable()")) (au! [WinLeave BufLeave] * #(setl! statusline " ")))