refactor: rename rootilities to utils for consistency
Adds support for Arrow.nvim Adds several other tweaks/modules
This commit is contained in:
+39
-26
@@ -2,11 +2,10 @@
|
|||||||
-- │ Lualine │
|
-- │ Lualine │
|
||||||
-- ╰─────────────────────────────────────────────────────────╯
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
local rootilities = require("utils.rootiest")
|
local utils = require("utils.rootiest")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.lualine_laststatus = vim.o.laststatus
|
vim.g.lualine_laststatus = vim.o.laststatus
|
||||||
if vim.fn.argc(-1) > 0 then
|
if vim.fn.argc(-1) > 0 then
|
||||||
@@ -34,8 +33,9 @@ return {
|
|||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "branch" },
|
lualine_b = {
|
||||||
|
{ "branch" },
|
||||||
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
LazyVim.lualine.root_dir(),
|
LazyVim.lualine.root_dir(),
|
||||||
{
|
{
|
||||||
@@ -104,61 +104,62 @@ return {
|
|||||||
local wakatime_stats = require("utils.wakatime_stats")
|
local wakatime_stats = require("utils.wakatime_stats")
|
||||||
return wakatime_stats.get_color()
|
return wakatime_stats.get_color()
|
||||||
end,
|
end,
|
||||||
on_click = function(button)
|
cond = function()
|
||||||
if button == "left" then
|
return utils.is_window_wide_enough(100)
|
||||||
vim.cmd(":WakaTimeToday")
|
end,
|
||||||
end
|
},
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
return require("utils.music_stats").get_icon_with_text()
|
||||||
end,
|
end,
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(100)
|
return utils.is_window_wide_enough(100)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{
|
|
||||||
function()
|
|
||||||
return require("utils.music_stats").get_icon_with_text()
|
|
||||||
end,
|
|
||||||
cond = function()
|
|
||||||
return rootilities.is_window_wide_enough(100)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
function()
|
function()
|
||||||
return vim.fn.wordcount().words
|
return vim.fn.wordcount().words
|
||||||
end,
|
end,
|
||||||
icon = " ",
|
icon = " ",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(80)
|
return utils.is_window_wide_enough(80)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"progress",
|
"progress",
|
||||||
separator = " ",
|
separator = " ",
|
||||||
padding = { left = 1, right = 0 },
|
padding = { left = 1, right = 0 },
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(60)
|
return utils.is_window_wide_enough(60)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"location",
|
"location",
|
||||||
padding = { left = 0, right = 1 },
|
padding = { left = 0, right = 1 },
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(40)
|
return utils.is_window_wide_enough(40)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"selection_count",
|
"selection_count",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(120)
|
return utils.is_window_wide_enough(120)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filesize",
|
"filesize",
|
||||||
cond = function()
|
cond = function()
|
||||||
return rootilities.is_window_wide_enough(100)
|
return utils.is_window_wide_enough(100)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
return require("arrow.statusline").text_for_statusline_with_icons()
|
||||||
|
end,
|
||||||
|
cond = function()
|
||||||
|
return utils.is_window_wide_enough(100)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -168,7 +169,6 @@ return {
|
|||||||
color = "CurSearch",
|
color = "CurSearch",
|
||||||
separator = { left = "", right = "" },
|
separator = { left = "", right = "" },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"searchcount",
|
"searchcount",
|
||||||
color = "CurSearch",
|
color = "CurSearch",
|
||||||
@@ -182,7 +182,20 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extensions = { "neo-tree", "lazy" },
|
extensions = {
|
||||||
|
"neo-tree",
|
||||||
|
"lazy",
|
||||||
|
"aerial",
|
||||||
|
"fugitive",
|
||||||
|
"fzf",
|
||||||
|
"mason",
|
||||||
|
"overseer",
|
||||||
|
"toggleterm",
|
||||||
|
"nvim-dap-ui",
|
||||||
|
"quickfix",
|
||||||
|
"symbols-outline",
|
||||||
|
"trouble",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- do not add trouble symbols if aerial is enabled
|
-- do not add trouble symbols if aerial is enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user