Skip to content

Commit

Permalink
fix(lualine): Always show running LSPs
Browse files Browse the repository at this point in the history
... and not only if copilot is enabled
  • Loading branch information
Allaman committed Jul 28, 2024
1 parent 6a2fad8 commit b0c2831
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions lua/core/plugins/lualine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,29 @@ local default_options = {

local function default_config_function(opts)
-- TODO: Add supermaven
if vim.g.config.plugins.copilot.enable then
local lsp_utils = require("core.plugins.lsp.utils")
local utils = require("utils.functions")
local function list_LSP_clients()
local clients = lsp_utils.get_LSP_clients()
local list = {}
for _, client in ipairs(clients) do
table.insert(list, client.name)
-- TODO only indicate a running copilot?
-- if client.name == "copilot" then
-- local icons = require("utils.icons")
-- return icons.apps.Copilot
-- end
end
return table.concat(list, "|")
local lsp_utils = require("core.plugins.lsp.utils")
local utils = require("utils.functions")
local function list_LSP_clients()
local clients = lsp_utils.get_LSP_clients()
local list = {}
for _, client in ipairs(clients) do
table.insert(list, client.name)
-- TODO only indicate a running copilot?
-- if client.name == "copilot" then
-- local icons = require("utils.icons")
-- return icons.apps.Copilot
-- end
end
opts.sections.lualine_a = {
{
list_LSP_clients,
cond = function()
return utils.table_length(lsp_utils.get_LSP_clients()) > 0
end,
},
}
return table.concat(list, "|")
end
opts.sections.lualine_a = {
{
list_LSP_clients,
cond = function()
return utils.table_length(lsp_utils.get_LSP_clients()) > 0
end,
},
}

-- Show info when recording a macro
local function is_macro_recording()
Expand Down

0 comments on commit b0c2831

Please sign in to comment.