nvim: heirline fixes
This commit is contained in:
parent
5198bacc1d
commit
dc43bd481a
2 changed files with 14 additions and 6 deletions
|
@ -40,7 +40,9 @@
|
|||
(set mod.vi-mode {:init (fn [self]
|
||||
(let [mode (. (api.nvim_get_mode) :mode)]
|
||||
(set self.mode mode)))
|
||||
:update :ModeChanged
|
||||
:update {1 :ModeChanged
|
||||
:pattern "*:*"
|
||||
:callback (vim.schedule_wrap #(vim.cmd.redrawstatus))}
|
||||
:static {:mode-names {:n :NORMAL
|
||||
:no :O-PENDING
|
||||
:nov :O-PENDING
|
||||
|
@ -205,19 +207,22 @@
|
|||
(let [spacer (if (or (> self.warnings 0)
|
||||
(> self.info 0)
|
||||
(> self.hints 0))
|
||||
" " "")]
|
||||
" "
|
||||
"")]
|
||||
(when (> self.errors 0)
|
||||
(.. " " self.errors spacer))))
|
||||
:hl {:fg colors.red}}
|
||||
3 {:provider (fn [self]
|
||||
(let [spacer (if (or (> self.info 0)
|
||||
(> self.hints 0))
|
||||
" " "")]
|
||||
" "
|
||||
"")]
|
||||
(when (> self.warnings 0)
|
||||
(.. " " self.warnings spacer))))
|
||||
:hl {:fg colors.yellow}}
|
||||
4 {:provider (fn [self]
|
||||
(let [spacer (if (> self.hints 0) " " "")]
|
||||
(let [spacer (if (> self.hints 0) " "
|
||||
"")]
|
||||
(when (> self.info 0)
|
||||
(.. " " self.info spacer))))
|
||||
:hl {:fg colors.cyan}}
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
: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
|
||||
|
@ -65,7 +66,9 @@
|
|||
{:fg fg-inactive :bg bg-inactive}))
|
||||
:on_click {:name :heirline_tabline_close_buffer_callback
|
||||
:callback (fn [_ minwid]
|
||||
(api.nvim_buf_delete minwid {:force false}))
|
||||
(vim.schedule #(api.nvim_buf_delete minwid
|
||||
{:force false}))
|
||||
(vim.cmd.redrawtabline))
|
||||
:minwid (fn [self]
|
||||
self.bufnr)}}})
|
||||
(set mod.close-tabpage {:provider "%999X %X" :hl :TabLine})
|
||||
|
|
Loading…
Reference in a new issue