2022-05-25 18:19:11 +00:00
|
|
|
(let [heirline (require :heirline)
|
|
|
|
utils (require :heirline.utils)
|
|
|
|
conditions (require :heirline.conditions)
|
2022-08-28 20:57:36 +00:00
|
|
|
ns (require :nifoc.statusline)
|
|
|
|
nt (require :nifoc.tabline)]
|
2022-05-25 18:19:11 +00:00
|
|
|
(local default-statusline [;; Left
|
|
|
|
ns.vi-mode
|
2022-08-29 20:36:11 +00:00
|
|
|
ns.git
|
|
|
|
ns.diagnostics
|
|
|
|
ns.current-function
|
2022-05-25 18:19:11 +00:00
|
|
|
;; Right
|
2022-05-25 20:34:02 +00:00
|
|
|
ns.push-right
|
2022-05-25 18:19:11 +00:00
|
|
|
ns.filetype-block
|
|
|
|
ns.space
|
|
|
|
ns.buffer-options
|
|
|
|
ns.space
|
|
|
|
ns.scrollbar
|
|
|
|
ns.space
|
2022-08-15 21:26:28 +00:00
|
|
|
ns.position
|
|
|
|
ns.search-count])
|
2022-05-25 18:19:11 +00:00
|
|
|
(local telescope-statusline
|
|
|
|
{:condition (fn []
|
|
|
|
(conditions.buffer_matches {:filetype [:TelescopePrompt]}))
|
2022-05-25 20:34:02 +00:00
|
|
|
1 (ns.custom-mode :Telescope :black :green)})
|
|
|
|
(local shell-statusline
|
|
|
|
{:condition (fn []
|
|
|
|
(not= vim.b.nifoc_shell_mode nil))
|
|
|
|
1 ns.vi-mode
|
|
|
|
2 ns.push-right
|
|
|
|
3 ns.scrollbar
|
|
|
|
4 ns.space
|
|
|
|
5 (ns.shell-mode :black :purple)})
|
2022-05-25 18:19:11 +00:00
|
|
|
(local statuslines {:hl ns.default-hl
|
2022-09-02 20:14:05 +00:00
|
|
|
:fallthrough false
|
2022-05-25 18:19:11 +00:00
|
|
|
1 telescope-statusline
|
2022-08-24 20:39:31 +00:00
|
|
|
2 shell-statusline
|
|
|
|
3 default-statusline})
|
2022-08-28 20:57:36 +00:00
|
|
|
(local winbar nil)
|
2022-08-29 20:36:11 +00:00
|
|
|
(local tabline [nt.os-indicator
|
|
|
|
(utils.make_buflist nt.buffer-block nt.truncate-left
|
|
|
|
nt.truncate-right)
|
|
|
|
nt.tabpages-block])
|
2022-08-28 20:57:36 +00:00
|
|
|
;; Load Lines
|
2022-05-25 18:19:11 +00:00
|
|
|
(set vim.opt.laststatus 3)
|
2022-08-28 20:57:36 +00:00
|
|
|
(heirline.setup statuslines winbar tabline))
|
2022-05-25 18:19:11 +00:00
|
|
|
|