Files
lux/modules/capabilities/neovim/lua-config/lua/plugins/ui.lua
T
2026-09-04 19:49:42 +02:00

120 lines
3.1 KiB
Lua

require("kanagawa").setup({
dimInactive = true,
colors = {
theme = {
all = {
ui = { bg_gutter = "none" },
},
},
},
})
vim.cmd.colorscheme("kanagawa-wave")
require("lz.n").load({
{
"lualine.nvim",
event = "VimEnter",
after = function()
local navic = require("nvim-navic")
local breadcrumb = function()
if not navic.is_available() then
return ""
end
local location = navic.get_location()
if vim.fn.strdisplaywidth(location) <= 60 then
return location
end
while vim.fn.strdisplaywidth(location) > 59 do
location = vim.fn.strcharpart(location, 0, vim.fn.strchars(location) - 1)
end
return location .. "…"
end
require("lualine").setup({
options = {
theme = "kanagawa",
component_separators = "",
section_separators = "",
globalstatus = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = { { "filename", path = 1 }, breadcrumb },
lualine_x = { "diagnostics" },
lualine_y = { "filetype" },
lualine_z = { "location" },
},
})
end,
},
{
"gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
after = function()
require("gitsigns").setup({
signs = {
add = { text = "│" },
change = { text = "│" },
delete = { text = "_" },
topdelete = { text = "‾" },
changedelete = { text = "~" },
untracked = { text = "┆" },
},
on_attach = function(bufnr)
local gs = require("gitsigns")
vim.keymap.set("n", "]h", function()
if vim.wo.diff then
return "]h"
end
vim.schedule(function()
gs.nav_hunk("next")
end)
return "<Ignore>"
end, { buffer = bufnr, desc = "Next git hunk", expr = true })
vim.keymap.set("n", "[h", function()
if vim.wo.diff then
return "[h"
end
vim.schedule(function()
gs.nav_hunk("prev")
end)
return "<Ignore>"
end, { buffer = bufnr, desc = "Previous git hunk", expr = true })
end,
})
end,
},
{
"zen-mode.nvim",
cmd = "ZenMode",
keys = {
{ "<leader>uz", "<cmd>ZenMode<cr>", desc = "Toggle zen mode" },
},
after = function()
require("zen-mode").setup({})
end,
},
{
"which-key.nvim",
event = "VimEnter",
after = function()
require("which-key").setup({
preset = "helix",
spec = {
{ "<leader>b", group = "Buffers" },
{ "<leader>c", group = "Code" },
{ "<leader>d", group = "Diagnostics" },
{ "<leader>n", group = "Notes" },
{ "<leader>q", group = "Database" },
{ "<leader>r", group = "HTTP" },
{ "<leader>s", group = "Search" },
{ "<leader>u", group = "UI" },
},
})
end,
},
})