Update tabline config

This commit is contained in:
Daniel Kempkens 2022-12-11 00:10:09 +01:00
parent 2af6c43bba
commit 6450791579
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -32,15 +32,17 @@
:hl (fn [self]
(let [visible (or self.is_active self.is_visible)]
{:bold visible :italic visible}))})
(set mod.file-flags [{:provider (fn [self]
(when (. vim :bo self.bufnr :modified)
" "))
(set mod.file-flags [{:condition #(api.nvim_buf_get_option $1.bufnr :modified)
:provider " "
:hl {:fg colors.yellow}}
{:provider (fn [self]
(when (or (not (. vim :bo self.bufnr
:modifiable))
(. vim :bo self.bufnr :readonly))
" "))
{:condition #(or (not (api.nvim_buf_get_option $1.bufnr
:modifiable))
(api.nvim_buf_get_option $1.bufnr
:readonly))
:provider (fn [self]
(if (= api.nvim_buf_get_option self.bufnr
:terminal)
" " " "))
:hl {:fg colors.orange}}])
(set mod.filename-block
(heirline-utils.insert mod.filename-block statusline.file-icon