feat: Trouble config

This commit is contained in:
Bogdan Buduroiu 2025-02-24 17:28:45 +08:00
parent 7fc7a4badd
commit 2d5e3fcfe8
Signed by: bruvduroiu
GPG key ID: A8722B2334DE9499
2 changed files with 57 additions and 2 deletions

11
nvim/lua/configs/edgy.lua Normal file
View file

@ -0,0 +1,11 @@
return {
animate = {
enabled = false,
},
exit_when_last = false,
right = {
{
ft = "trouble",
},
},
}

View file

@ -70,13 +70,51 @@ return {
size = 0.20, -- 30% of the window
},
},
diagnostics = {
win = {
type = "split",
relative = "win",
position = "bottom",
size = 0.30,
},
},
lsp = { -- Configure LSP references mode
win = {
type = "split", -- split window
relative = "win", -- relative to current window
position = "right", -- appear below
size = 0.25, -- 25% of the window height
},
},
preview = {
mode = "diagnostics",
preview = {
type = "split",
relative = "win",
position = "right",
size = 0.3,
},
},
preview_float = {
mode = "diagnostics",
preview = {
type = "float",
relative = "editor",
border = "rounded",
title = "Preview",
title_pos = "center",
position = { 0, -2 },
size = { width = 0.3, height = 0.5 },
zindex = 200,
},
},
},
}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
"<cmd>Trouble preview toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
@ -91,7 +129,7 @@ return {
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
"<cmd>Trouble lsp toggle focus=false<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
@ -184,4 +222,10 @@ return {
},
},
},
{
"folke/edgy.nvim",
event = "VeryLazy",
enabled = false,
opts = require("configs.edgy"),
},
}