Files
2026-06-07 22:29:58 +02:00

156 lines
6.3 KiB
Lua
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--[[
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤
⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂
⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀
⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂
⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇
⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇
⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉
__ _ _
/ _|___ ___| |_ __ _ ___| | __
| ||_ /____/ __| __/ _` |/ __| |/ /
| _/ /_____\__ \ || (_| | (__| <
|_|/___| |___/\__\__,_|\___|_|\_\
Neovim 0.12 configuration
(c) Frank Zechert 2026
]]
local function expandtabs()
if not vim.bo.expandtab then
return string.format("%s %d", vim.g.ui.listchars.leadtab, vim.bo.tabstop)
else
local width = vim.bo.shiftwidth
if width == 0 then
width = vim.bo.tabstop
end
return string.format("%s %d", vim.g.ui.listchars.nbsp, width)
end
end
local function windownumber()
return string.format("%s %s", vim.g.ui.symbols.window, vim.fn.winnr())
end
local function treesitter_status()
local ok, parser = pcall(vim.treesitter.get_parser, 0)
if not ok or not parser then
return ""
else
return "T"
end
end
return {
{
"nvim-lualine/lualine.nvim",
dependencies = {
{ "nvim-tree/nvim-web-devicons" },
},
lazy = false,
opts = {
options = {
component_separators = vim.g.ui.symbols.component_separators,
section_separators = vim.g.ui.symbols.section_separators,
globalstatus = false,
refresh = {
refresh_time = 33, -- ~30 fps
}
},
sections = {
lualine_a = { "mode" },
lualine_b = { "searchcount", "selectioncount" },
lualine_c = {
{ "filename", file_status = true, newfile_status = true, path = 1 },
},
lualine_x = {
"encoding",
{ "fileformat", icons_enabled = true, symbols = { unix = "LF", dos = "CRLF", mac = "CR" } },
expandtabs,
"filesize"
},
lualine_y = {},
lualine_z = { "location", "progress" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {
{ "filename", file_status = true, newfile_status = true, path = 1 },
},
lualine_x = {
"encoding",
{ "fileformat", icons_enabled = true, symbols = { unix = "LF", dos = "CRLF", mac = "CR" } },
expandtabs,
"filesize",
},
lualine_y = {},
lualine_z = { "location", "progress" },
},
tabline = {
lualine_a = {
{ "buffers", mode = 2, use_mode_colors = true },
},
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {
{ "tabs", mode = 0, use_mode_colors = true },
},
},
winbar = {
lualine_a = { windownumber },
lualine_b = { "filename", "filetype" },
lualine_c = { "diagnostics" },
lualine_x = { treesitter_status },
lualine_y = { "branch", "diff" },
lualine_z = {},
},
inactive_winbar = {
lualine_a = { windownumber },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {},
}
},
keys = {
{ "<leader>b1", "<Cmd>:LualineBuffersJump! 1<CR>", desc = "Show Buffer 1" },
{ "<leader>b2", "<Cmd>:LualineBuffersJump! 2<CR>", desc = "Show Buffer 2" },
{ "<leader>b3", "<Cmd>:LualineBuffersJump! 3<CR>", desc = "Show Buffer 3" },
{ "<leader>b4", "<Cmd>:LualineBuffersJump! 4<CR>", desc = "Show Buffer 4" },
{ "<leader>b5", "<Cmd>:LualineBuffersJump! 5<CR>", desc = "Show Buffer 5" },
{ "<leader>b6", "<Cmd>:LualineBuffersJump! 6<CR>", desc = "Show Buffer 6" },
{ "<leader>b7", "<Cmd>:LualineBuffersJump! 7<CR>", desc = "Show Buffer 7" },
{ "<leader>b8", "<Cmd>:LualineBuffersJump! 8<CR>", desc = "Show Buffer 8" },
{ "<leader>b9", "<Cmd>:LualineBuffersJump! 9<CR>", desc = "Show Buffer 9" },
{ "<leader>b0", "<Cmd>:LualineBuffersJump! 10<CR>", desc = "Show Buffer 10" },
{
"<leader>bb",
function()
local index = tonumber(vim.fn.input("Jump to Buffer: "))
if index then
vim.cmd("LualineBuffersJump! " .. index)
end
end,
desc = "Show Buffer ?"
},
}
}
}