93 lines
1.5 KiB
Lua
93 lines
1.5 KiB
Lua
---@module "lazy.nvim"
|
|
---@type LazySpec[]
|
|
return {
|
|
{
|
|
"mason-org/mason-lspconfig.nvim",
|
|
opts = {
|
|
ensure_installed = {
|
|
"lua_ls",
|
|
},
|
|
},
|
|
dependencies = {
|
|
{
|
|
"mason-org/mason.nvim", opts = {}
|
|
},
|
|
"neovim/nvim-lspconfig",
|
|
},
|
|
},
|
|
{
|
|
"folke/lazydev.nvim",
|
|
ft = "lua",
|
|
opts = {
|
|
library = {
|
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"folke/trouble.nvim",
|
|
opts = {},
|
|
cmd = "Trouble",
|
|
keys = function (_, _)
|
|
local tr = require("trouble")
|
|
|
|
---@type LazyKeysSpec[]
|
|
return {
|
|
|
|
{"<leader>xx",
|
|
function ()
|
|
tr.toggle(
|
|
---@diagnostic disable-next-line: missing-fields
|
|
{
|
|
mode = "diagnostics",
|
|
focus = false}
|
|
)
|
|
end,
|
|
desc = "Trouble Diagnostics",
|
|
mode = "n"
|
|
},
|
|
{"<leader>xX",
|
|
function ()
|
|
tr.toggle(
|
|
---@diagnostic disable-next-line: missing-fields
|
|
{
|
|
mode = "diagnostics",
|
|
filter = {
|
|
buf = 0,
|
|
},
|
|
focus = false
|
|
}
|
|
)
|
|
end,
|
|
desc = "Buffer Diagnostics (Trouble)"
|
|
},
|
|
{"<leader>xQ",
|
|
function ()
|
|
tr.toggle(
|
|
---@diagnostic disable-next-line: missing-fields
|
|
{
|
|
mode = "qflist",
|
|
focus = false
|
|
}
|
|
)
|
|
end,
|
|
desc = "Quickfix List (Trouble)"
|
|
},
|
|
{"<leader>cs",
|
|
function ()
|
|
tr.toggle(
|
|
---@diagnostic disable-next-line: missing-fields
|
|
{
|
|
mode = "symbols",
|
|
focus = false
|
|
}
|
|
)
|
|
end,
|
|
desc = "Symbols (Trouble)"
|
|
}
|
|
}
|
|
end
|
|
|
|
}
|
|
}
|