mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(lsp-config.lua): update key bindings for code actions and references, remove pycodestyle config feat(lualine.lua): add functions to display Flutter Tools statusline and check if Flutter Tools is active feat(mason.lua): add kotlin_language_server to the list of supported language servers feat(molten.lua): improve configuration for Molten plugin based on file type feat(none-ls.lua): improve configuration for null-ls sources, resolve virtual environment for mypy diagnostics fix(telescope.lua): update trouble import path to sources instead of providers feat(telescope.lua): add vimgrep_arguments to improve search functionality feat(telescope.lua): add mappings for trouble.open in insert and normal mode feat(telescope.lua): load extensions flutter and dap feat(telescope.lua): define custom find_files function with specific find_command feat(trouble.lua): update trouble import path to sources instead of providers feat(trouble.lua): update mappings to use trouble_sources.open instead of trouble_telescope.open_with_trouble feat(core/init.lua): add ignorecase and smartcase options for case-insensitive searching feat(core/init.lua): add backspace option for more flexible backspacing behavior feat(core/init.lua): set cursor color based on mode in InsertEnter and InsertLeave autocmds feat(dap.lua): add nvim-nio dependency and load telescope-dap.nvim extension feat(flutter-tools.lua): add flutter-tools.nvim plugin configuration feat(molten.lua): add lazy loading and ft option for Python files feat(none-ls.lua.disabled): add none-ls.nvim plugin configuration feat(poet-v.lua): add lazy loading and ft option for Python files feat(vim-tmux-navigator.lua): update cmd and keys for vim-tmux-navigator plugin chore(remap.lua): reorganize keymap descriptions for better clarity and readability feat(remap.lua): add key mappings for jumping up, down, to next, and to previous locations with center screen feat(remap.lua): add key mappings for resizing windows right, left, up, and down by 10 lines feat(safe-invoke.lua): add utility function SafeInvoke to safely invoke functions and handle errors
126 lines
3.4 KiB
Lua
126 lines
3.4 KiB
Lua
local lualine = require("lualine")
|
|
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
|
local molten_status = require("molten.status") -- to configure molten statusline
|
|
|
|
|
|
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 = {
|
|
{
|
|
GetFlutterToolsStatusLine,
|
|
cond = IsFlutterToolsActive,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{
|
|
molten_status.initialized,
|
|
},
|
|
{
|
|
molten_status.kernels,
|
|
},
|
|
{
|
|
GetPoetvStatusLine,
|
|
cond = IsPoetvActive,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{
|
|
lazy_status.updates,
|
|
cond = lazy_status.has_updates,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{ "encoding" },
|
|
{ "fileformat" },
|
|
{ "filetype" },
|
|
},
|
|
},
|
|
})
|