2024-08-25 00:46:03 -07:00
|
|
|
(local nvim (require :lib/nvim))
|
|
|
|
|
|
|
|
(local navic (require :nvim-navic))
|
|
|
|
|
|
|
|
(let [lualine (require :lualine)]
|
|
|
|
(lualine.setup {:options {:theme "ayu"}
|
|
|
|
:sections {:lualine_c [:filename {1 navic.get_location
|
|
|
|
:cond navic.is_available}]
|
|
|
|
:lualine_y [(fn []
|
2024-08-25 23:44:07 -07:00
|
|
|
; TODO broken?
|
2024-08-25 00:46:03 -07:00
|
|
|
(let [msg "No Active Lsp"
|
|
|
|
buf_ft (vim.api.nvim_buf_get_option 0 "filetype")
|
|
|
|
clients (vim.lsp.get_active_clients)]
|
|
|
|
(if (= (next clients) nil) msg)
|
|
|
|
(each [_ client (ipairs clients)]
|
|
|
|
(let [filetypes (. client :config :filetypes)]
|
|
|
|
(if (and filetypes (vim.fn.index filetypes buf_ft)) client.name)))
|
|
|
|
msg))]
|
|
|
|
:lualine_x [:filetype]}}))
|
|
|
|
|
|
|
|
(require :neo-tree)
|