dotfiles/vim/lua/lightline_config.lua

80 lines
1.5 KiB
Lua
Raw Normal View History

2023-09-20 20:55:38 +00:00
require("nvim-web-devicons").setup({})
local mode_map = {
NORMAL = "N",
INSERT = "I",
REPLACE = "R",
COMMAND = "C",
VISUAL = "v",
["V-BLOCK"] = "V",
["V-LINE"] = "V-LINE",
}
require("lualine").setup({
options = {
icons_enabled = false,
theme = "nord",
},
sections = {
lualine_a = {
{
"mode",
fmt = function(mode)
return mode_map[mode] or mode
end,
},
2023-09-21 03:36:09 +00:00
"paste",
2023-09-20 20:55:38 +00:00
},
lualine_b = { "filename" },
lualine_c = {
2023-09-21 03:36:09 +00:00
{
"branch",
padding = { left = 0 },
},
2023-09-20 20:55:38 +00:00
"diff",
{
"diagnostics",
sources = { "nvim_lsp" },
always_visible = false,
symbols = {
error = function(count)
return count .. "E"
end,
warn = function(count)
return count .. "W"
end,
info = function(count)
return count .. "I"
end,
hint = function(count)
return count .. "H"
end,
},
},
},
2023-09-21 03:36:09 +00:00
lualine_x = {
{
function()
local go_status_line = vim.api.nvim_call_function("go#statusline#Show", {})
if go_status_line ~= "" then
return go_status_line
end
return vim.bo.filetype
end,
padding = { left = 1, right = 0 },
},
},
lualine_y = { { "progress", padding = { left = 1, right = 0 } } },
2023-10-01 06:09:56 +00:00
lualine_z = { { "location", padding = { left = 1, right = 1 } } },
2023-09-21 03:36:09 +00:00
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { { "location", padding = { right = 0 } } },
lualine_y = {},
lualine_z = {},
2023-09-20 20:55:38 +00:00
},
})