mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim/lua/user/plugins/ui/statusline.lua: update
This commit is contained in:
parent
d6533309c0
commit
683c1a95cc
1 changed files with 43 additions and 25 deletions
|
|
@ -14,6 +14,18 @@ local function is_not_popup()
|
|||
return not vim.tbl_contains(types, vim.bo.filetype)
|
||||
end
|
||||
|
||||
local function linter()
|
||||
local ok, lint = pcall(require, "lint")
|
||||
if ok then
|
||||
local linters = lint.get_running()
|
||||
if #linters == 0 then
|
||||
return ""
|
||||
end
|
||||
return " " .. table.concat(linters, ", ")
|
||||
end
|
||||
return "no linter"
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
|
|
@ -37,7 +49,6 @@ return {
|
|||
"alpha"
|
||||
}
|
||||
},
|
||||
-- theme = "catppuccin"
|
||||
theme = {
|
||||
normal = {
|
||||
a = "StatusLineNormal",
|
||||
|
|
@ -71,19 +82,6 @@ return {
|
|||
},
|
||||
lualine_b = {
|
||||
{"branch"},
|
||||
{
|
||||
"lsp-status",
|
||||
disabled_filetypes = {
|
||||
"TelescopePrompt",
|
||||
},
|
||||
on_click = function (_, btn, _)
|
||||
if btn == "l" then
|
||||
vim.cmd(":LspInfo")
|
||||
elseif btn == "r" then
|
||||
vim.cmd(":LspRestart")
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
|
|
@ -104,13 +102,19 @@ return {
|
|||
},
|
||||
lualine_c = {
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
"lsp-status",
|
||||
disabled_filetypes = {
|
||||
"TelescopePrompt",
|
||||
},
|
||||
on_click = function (_, btn, _)
|
||||
if btn == "l" then
|
||||
vim.cmd(":LspInfo")
|
||||
elseif btn == "r" then
|
||||
vim.cmd(":LspRestart")
|
||||
end
|
||||
end
|
||||
},
|
||||
linter,
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
|
|
@ -129,13 +133,27 @@ return {
|
|||
winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_winbar = {
|
||||
lualine_c = {
|
||||
{ "filetype", icon_only = true },
|
||||
{
|
||||
"filename",
|
||||
cond = is_not_popup,
|
||||
path = 1,
|
||||
symbols = vim.tbl_deep_extend("force", icons.file_status, {
|
||||
unnamed = "",
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue