Files
absolute-vim/lua/absolute/after/lualine.lua
David Ibia fa59b7988c feat(dap.lua): add virtual text setup for better debugging experience
feat(dap.lua): add support for process.env.PORT environment variable to be able to run app on a configurable port
feat(lsp-config.lua): add support for detecting python environment using DPE module
feat(lualine.lua): add support for noice statusline component
feat(mason.lua): update installed language servers list
feat(noice.lua): add configuration for noice plugin
feat(none-ls.lua): remove black and mypy formatters from null-ls setup

fix(nvim-cmp.lua): change completeopt value to "menu,menuone,preview,noinsert" and add autocomplete trigger event on text change
feat(nvim-cmp.lua): add border and winhighlight settings for documentation window to improve visual appearance
feat(nvim-cmp.lua): add 'nvim_lsp_signature_help' as a source for autocompletion
refactor(colorscheme.lua): refactor SetupWindowPreferences function to dynamically set blend values for highlight groups
feat(init.lua): add setting for 'completeopt' to "menuone"
feat(plugins/noice.lua): add configuration for 'noice.nvim' plugin with dependencies and event trigger
feat(plugins/nvim-treesitter.lua): update configuration to run TSUpdate command silently

feat(utils): add Lua utility functions to detect and manage Lua versions and paths
feat(utils): add Python utility functions to check and resolve Python environments
style(theme): update current theme to 'catppuccin' in Lua script
2024-09-19 14:35:11 +01:00

124 lines
3.4 KiB
Lua

local lualine = require("lualine")
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
local noice = require("noice")
local colors = {
blue = "#65D1FF",
green = "#3EFFDC",
violet = "#FF61EF",
yellow = "#FFDA7B",
red = "#FF4A4A",
fg = "#c3ccdc",
bg = "#112638",
inactive_bg = "#2c3043",
}
local my_lualine_theme = {
normal = {
a = { bg = colors.blue, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
insert = {
a = { bg = colors.green, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
visual = {
a = { bg = colors.violet, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
command = {
a = { bg = colors.yellow, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
replace = {
a = { bg = colors.red, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
inactive = {
a = { bg = colors.inactive_bg, fg = colors.semilightgray, gui = "bold" },
b = { bg = colors.inactive_bg, fg = colors.semilightgray },
c = { bg = colors.inactive_bg, fg = colors.semilightgray },
},
}
function GetFlutterToolsStatusLine()
local application_version = vim.g.flutter_tools_decorations.app_version
local device = vim.g.flutter_tools_decorations.device
local result = "Flutter: " .. application_version .. " " .. device
end
function IsFlutterToolsActive()
if vim.g.flutter_tools_decorations ~= nil then
return true
else
return false
end
end
function GetPoetvStatusLine()
-- Get the poetv statusline
-- If poetv is not active, return empty string
if IsPoetvActive() then
local poetv_name = vim.g.poetv_name
local poetv_statusline_symbol = vim.g.poetv_statusline_symbol
local result = string.sub(poetv_name, 1, 20) .. " " .. poetv_statusline_symbol
return result
else
return ""
end
end
function IsPoetvActive()
-- Check if vim.g.poetv_name exists
-- If it does, then poetv is active
if vim.g.poetv_name ~= nil then
return true
else
return false
end
end
-- configure lualine with modified theme
lualine.setup({
options = {
theme = my_lualine_theme,
},
sections = {
lualine_x = {
{
noice.api.statusline.mode.get,
cond = noice.api.statusline.mode.has,
color = { fg = "#ff9e64" },
},
{
GetFlutterToolsStatusLine,
cond = IsFlutterToolsActive,
color = { fg = "#ff9e64" },
},
{
GetPoetvStatusLine,
cond = IsPoetvActive,
color = { fg = "#ff9e64" },
},
{
lazy_status.updates,
cond = lazy_status.has_updates,
color = { fg = "#ff9e64" },
},
{ "encoding" },
{ "fileformat" },
{ "filetype" },
},
},
})