This commit is contained in:
Christian Nieves
2024-01-12 20:52:25 -06:00
parent f1d6172101
commit 3f48940604
3 changed files with 50 additions and 41 deletions

View File

@ -1,4 +1,28 @@
return {
{
"luozhiya/lsp-virtual-improved.nvim",
event = { "LspAttach" },
config = function()
require("lsp-virtual-improved").setup()
end,
},
{
"folke/trouble.nvim",
event = { "LspAttach" },
config = function()
-- Diagnostics
require("trouble").setup({
use_diagnostic_signs = true, -- enabling this will use the signs defined in your lsp client
})
end,
keys = {
{ "<leader>xt", "<cmd>:Telescope diagnostics<CR>" },
{ "<leader>xw", "<cmd>:Trouble workspace_diagnostics<CR>" },
{ "<leader>xd", "<cmd>:Trouble document_diagnostics<CR>" },
{ "[g", "<cmd>lua vim.diagnostic.goto_prev()<CR>" },
{ "]g", "<cmd>lua vim.diagnostic.goto_next()<CR>" },
},
},
{
"Maan2003/lsp_lines.nvim",
event = { "LspAttach" },
@ -7,15 +31,31 @@ return {
local signs = {
Error = "",
Warning = "",
Hint = "",
Hint = "",
Info = "",
Other = "",
Other = "",
}
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
-- local colors = {
-- Error = { primary = "#f28b82", secondary = "#ab0101", invert = true },
-- Warning = { primary = "#f2b066", secondary = "#ab7a00", invert = false },
-- Hint = { primary = "#b4f9f8", secondary = "#008080", invert = true },
-- Info = { primary = "#abf2b0", secondary = "#008080", invert = true },
-- Other = { primary = "#abf2b0", secondary = "#008080", invert = true },
-- }
-- for type, colorpair in pairs(colors) do
-- local hl = "DiagnosticVirtualText" .. type
-- if not colorpair.invert then
-- vim.api.nvim_set_hl(0, hl, { fg = colorpair.primary, bg = colorpair.secondary })
-- else
-- vim.api.nvim_set_hl(0, hl, { fg = colorpair.secondary, bg = colorpair.primary })
-- end
-- end
require("lsp_lines").setup()
vim.schedule(function()
@ -46,36 +86,4 @@ return {
},
},
},
{
"luozhiya/lsp-virtual-improved.nvim",
event = { "LspAttach" },
config = function()
require("lsp-virtual-improved").setup()
end,
},
{
"folke/trouble.nvim",
event = { "LspAttach" },
config = function()
-- Diagnostics
require("trouble").setup({
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = "",
},
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
})
end,
keys = {
{ "<leader>xt", "<cmd>:Telescope diagnostics<CR>" },
{ "<leader>xw", "<cmd>:Trouble workspace_diagnostics<CR>" },
{ "<leader>xd", "<cmd>:Trouble document_diagnostics<CR>" },
{ "[g", "<cmd>lua vim.diagnostic.goto_prev()<CR>" },
{ "]g", "<cmd>lua vim.diagnostic.goto_next()<CR>" },
},
},
}