mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
- Add configuration for Jedi-Vim plugin in `lua/absolute/plugins/jedi.lua` - Create `lua/absolute/after/jedi.lua` to set Jedi-Vim mappings and options fix: fix lualine theme and add custom section - Update `lua/absolute/after/lualine.lua` to fix the lualine theme configuration - Add a custom section to display the Poetv status line in lualine feat: add keybindings for Poetv plugin - Add keybindings for activating and deactivating virtualenv in `lua/absolute/after/poet-v.lua` fix: fix remap keybindings - Update `lua/absolute/remap.lua` to fix and improve remap keybindings feat: add alternate escape keybinding - Add keybinding to use <C-c> as an alternate escape key in insert mode fix: disable Q keybinding - Disable the Q keybinding to prevent accidentally entering Ex mode feat: add keybinding for formatting document with LSP Formatter - Add keybinding to format the document using the LSP Formatter feat: add keybindings for navigation quick fixes - Add keybindings for navigating through quick fixes in the location list and the quickfix list feat: add keybinding for regex replace - Add keybinding to perform a regex replace in the entire file feat: add keybinding for sourcing file - Add keybinding to source the current file feat: add keybinding for toggling TMUX pane - Add keybinding to toggle the TMUX pane using MaximizerToggle command
99 lines
2.6 KiB
Lua
99 lines
2.6 KiB
Lua
local lualine = require("lualine")
|
|
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
|
|
|
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 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 = {
|
|
{
|
|
GetPoetvStatusLine,
|
|
cond = IsPoetvActive,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{
|
|
lazy_status.updates,
|
|
cond = lazy_status.has_updates,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{ "encoding" },
|
|
{ "fileformat" },
|
|
{ "filetype" },
|
|
},
|
|
},
|
|
})
|