neovim/lua/plugins/ui.lua
2025-09-13 23:00:04 -04:00

140 lines
3.4 KiB
Lua

-- UI and appearance plugins
return {
{
"zenbones-theme/zenbones.nvim",
lazy = false,
priority = 1000,
dependencies = "rktjmp/lush.nvim",
config = function()
if vim.g.light_mode then
vim.o.background = "light"
else
vim.o.background = "dark"
end
vim.cmd.colorscheme("zenwritten")
end,
},
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = { signs = false } },
{
"echasnovski/mini.nvim",
keys = {
{
"<leader>m",
function()
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
end,
desc = "Open mini.files (Directory of Current File)",
},
},
config = function()
require("mini.files").setup()
local getWords = require("utils.statusline").getWords
require("mini.statusline").setup({
content = {
active = function()
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
local git = MiniStatusline.section_git({ trunc_width = 75 })
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
local location = MiniStatusline.section_location({ trunc_width = 75 })
local search = MiniStatusline.section_searchcount({ trunc_width = 75 })
local words = getWords()
return MiniStatusline.combine_groups({
{ hl = mode_hl, strings = { mode } },
{ hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } },
"%<",
{ hl = "MiniStatuslineFilename", strings = { filename } },
"%=",
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
{ hl = "MiniStatuslineFileinfo", strings = { words } },
{ hl = mode_hl, strings = { search, location } },
})
end,
},
})
end,
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = { "bash", "c", "html", "lua", "markdown", "vim", "vimdoc" },
auto_install = true,
highlight = { enable = false },
indent = { enable = false },
})
end,
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
dashboard = { enabled = true },
input = { enabled = true },
terminal = { enabled = true },
notify = { enabled = true },
},
keys = {
{
"<leader>T",
function()
Snacks.terminal()
end,
desc = "Toggle Terminal",
},
},
},
{
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" },
opts = {},
},
{
"folke/trouble.nvim",
opts = {},
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
},
}