summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-06-12 00:32:45 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-06-12 00:32:45 +0200
commit25df2ef07dfe8b4746c8b727e362be5a481fb0cb (patch)
tree5b5c09f5e13432fffc52cbd5d3f93b317ea3279d
parent61c8287dda6e3282992a0821b366c6fbfd6221d4 (diff)
Update lualine with new apis and remove nvim-tree
-rw-r--r--fnl/plugins/lualine.fnl29
1 files changed, 12 insertions, 17 deletions
diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl
index 0ec9217..0c11537 100644
--- a/fnl/plugins/lualine.fnl
+++ b/fnl/plugins/lualine.fnl
@@ -15,10 +15,12 @@
(local ignore [:help :packer :spectre_panel :TelescopePrompt])
(fn active-clients []
- (let [clients (vim.lsp.buf_get_clients)
+ (let [clients (vim.lsp.get_clients)
+ buf_num (vim.api.nvim_buf_get_number 0)
client_names []]
(each [_ client (pairs clients)]
- (table.insert client_names client.name))
+ (when (. (. client :attached_buffers) buf_num)
+ (table.insert client_names client.name)))
(if (> (length client_names) 0)
(table.concat client_names ", ")
"")))
@@ -32,30 +34,20 @@
:symbols {:error (.. (. icons :error) " ")
:warn (.. (. icons :warn) " ")}
:colored false
- :disabled_buftypes [:nvim-tree]
:padding 0
:update_in_insert false
:always_visible true})
-(local diff {1 :diff
- :colored false
- :disabled_buftypes [:nvim-tree]
- :cond hide-in-width})
+(local diff {1 :diff :colored false :cond hide-in-width})
-(local branch {1 "b:gitsigns_head"
- :icon (. icons :git)
- :disabled_buftypes [:nvim-tree]
- :cond hide-in-width})
+(local branch {1 "b:gitsigns_head" :icon (. icons :git) :cond hide-in-width})
(local filetype {1 :filetype
:icon_only true
- :disabled_buftypes [:nvim-tree]
:colored false
:cond hide-in-width})
-(local language-server {1 active-clients
- :disabled_buftypes [:nvim-tree]
- :cond hide-in-width})
+(local language-server {1 active-clients :cond hide-in-width})
(local lsp-progress
{1 :lsp_progress
@@ -84,6 +76,9 @@
:lualine_z [:location :progress]}
:extensions [:oil :mason]})
-(local dependencies [:nvim-tree/nvim-web-devicons :arkav/lualine-lsp-progress])
+(local dependencies [:arkav/lualine-lsp-progress])
-{1 :nvim-lualine/lualine.nvim :event [:BufReadPost :BufNewFile] : opts : dependencies}
+{1 :nvim-lualine/lualine.nvim
+ :event [:BufReadPost :BufNewFile]
+ : opts
+ : dependencies}