dotfiles/home/config/nvim/plugins/heirline.fnl

61 lines
2.9 KiB
Text
Raw Normal View History

2022-05-25 18:19:11 +00:00
(let [heirline (require :heirline)
utils (require :heirline.utils)
conditions (require :heirline.conditions)
ns (require :nifoc.statusline)
2023-01-11 21:45:22 +00:00
nt (require :nifoc.tabline)
nc (require :nifoc.statuscolumn)]
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
2022-10-27 10:28:26 +00:00
ns.navic
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
ns.position
2023-04-11 08:55:50 +00:00
ns.search-count
ns.command])
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)})
2023-12-29 21:45:27 +00:00
(local neogit-statusline {:condition (fn []
(conditions.buffer_matches {:filetype [:NeogitBranchDescription
:NeogitCommitMessage
:NeogitCommitView
:NeogitLogView
:NeogitMergeMessage
:NeogitPopup
:NeogitStatus
:NeogitTagMessage]}))
1 (ns.custom-mode :Neogit :black :purple)
2 ns.git})
2022-05-25 20:34:02 +00:00
(local shell-statusline
2023-01-11 21:45:22 +00:00
{:condition #(not= vim.b.nifoc_shell_mode nil)
2022-05-25 20:34:02 +00:00
1 ns.vi-mode
2 ns.push-right
3 ns.scrollbar
4 ns.space
5 (ns.shell-mode :black :purple)})
2023-01-11 21:45:22 +00:00
(local statusline {:hl ns.default-hl
:fallthrough false
1 telescope-statusline
2023-12-29 19:19:42 +00:00
2 neogit-statusline
3 shell-statusline
4 default-statusline})
(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])
2023-01-12 09:59:15 +00:00
(local statuscolumn [nc.diagnostic-signs nc.line-number nc.gitsigns-or-bar])
;; Load Lines
2022-05-25 18:19:11 +00:00
(set vim.opt.laststatus 3)
2023-01-11 21:45:22 +00:00
(set vim.opt.showtabline 2)
(heirline.setup {: statusline : winbar : tabline : statuscolumn}))