blob: b2f7e143a62d197bcc11983c13111ae77d6667bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
;; Statusbar.
(local icons (require :settings.icons))
(local disable [:neogitstatus
:netrw
:lir
:lazy
:alpha
:neo-tree
:Outline
:NeogitStatus
:NeogitCommitMessage])
(local ignore [:help :packer :spectre_panel :TelescopePrompt])
(λ active-clients []
(let [clients (vim.lsp.get_clients)
buf_num (vim.api.nvim_buf_get_number 0)
client_names []]
(each [_ client (pairs clients)]
(when (. (. client :attached_buffers) buf_num)
(table.insert client_names client.name)))
(if (> (length client_names) 0)
(table.concat client_names ", ")
"")))
(λ hide-in-width []
(> (vim.fn.winwidth 0) 80))
(local diagnostics {1 :diagnostics
:sources [:nvim_diagnostic]
:sections [:error :warn]
:symbols {:error (.. (. icons :error) " ")
:warn (.. (. icons :warn) " ")}
:colored false
:padding 0
:update_in_insert false
:always_visible true})
(local diff {1 :diff :colored false :cond hide-in-width})
(local branch {1 "b:gitsigns_head" :icon (. icons :git) :cond hide-in-width})
(local filetype {1 :filetype
:icon_only true
:colored false
:cond hide-in-width})
(local language-server {1 active-clients :cond hide-in-width})
(local lsp-progress
{1 :lsp_progress
:display_components [[:title :percentage :message]]
:timer {:progress_enddelay 500 :lsp_client_name_enddelay 500}})
(local opts {:options {:icons_enabled true
:theme :auto
:component_separators ""
:section_separators {:left "" :right ""}
:disabled_filetypes disable
:ignore_focus ignore
:always_divide_middle true
:globalstatus true}
:sections {:lualine_a [:mode]
:lualine_b [:filename branch diff]
:lualine_c {}
:lualine_x [lsp-progress language-server diagnostics]
:lualine_y [filetype]
:lualine_z [:location :progress]}
:inactive_sections {:lualine_a [:mode]
:lualine_b {}
:lualine_c {}
:lualine_x {}
:lualine_y {}
:lualine_z [:location :progress]}
:extensions [:oil :mason]})
(local dependencies [:arkav/lualine-lsp-progress])
{1 :nvim-lualine/lualine.nvim
:event [:BufReadPost :BufNewFile]
: opts
: dependencies}
|