mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 19:50:38 +00:00
feat(lualine.lua): add function IsMoltenActive to check if Molten plugin is active and display corresponding status line configuration
This commit is contained in:
@@ -89,6 +89,19 @@ function IsPoetvActive()
|
||||
end
|
||||
end
|
||||
|
||||
function IsMoltenActive()
|
||||
-- Check if molten is active
|
||||
-- If molten is active, then return true
|
||||
|
||||
-- Check if vim.fn.MoltenStatusLineInit is a function
|
||||
|
||||
if vim.fn.exists("*MoltenStatusLineInit") == 1 then
|
||||
return molten_status.initialized
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- configure lualine with modified theme
|
||||
lualine.setup({
|
||||
options = {
|
||||
@@ -101,11 +114,10 @@ lualine.setup({
|
||||
cond = IsFlutterToolsActive,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
molten_status.initialized,
|
||||
},
|
||||
{
|
||||
molten_status.kernels,
|
||||
cond = IsMoltenActive,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
GetPoetvStatusLine,
|
||||
|
||||
Reference in New Issue
Block a user