add better diagnostics plugin

This commit is contained in:
kyasuda
2025-08-19 09:45:05 -07:00
parent c3a73c4a00
commit 180160fee1
3 changed files with 5 additions and 14 deletions

View File

@@ -21,6 +21,10 @@ create_custom_command("Config", "edit ~/.config/nvim", "Edit nvim configuration"
create_custom_command("Keymaps", "edit ~/.config/nvim/lua/core/keymaps.lua", "Edit Hyprland keybindings") create_custom_command("Keymaps", "edit ~/.config/nvim/lua/core/keymaps.lua", "Edit Hyprland keybindings")
create_custom_command("Hypr", "edit ~/.config/hypr/hyprland.conf", "Edit Hyprland configuration") create_custom_command("Hypr", "edit ~/.config/hypr/hyprland.conf", "Edit Hyprland configuration")
vim.keymap.set("", "<Leader>tl", function()
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
end, { desc = "Toggle diagnostics virtual text" })
-- {{{ Basic Mappings -- {{{ Basic Mappings
local basic_mappings = { local basic_mappings = {
{ key = "<C-u>", cmd = "<C-u>zz", desc = "Scroll up and center", mode = "n" }, { key = "<C-u>", cmd = "<C-u>zz", desc = "Scroll up and center", mode = "n" },

View File

@@ -73,13 +73,9 @@ local border = {
o.winborder = "rounded" o.winborder = "rounded"
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = true, virtual_text = false,
signs = true, signs = true,
underline = true, underline = true,
float = { border = "rounded", source = true }, float = { border = "rounded", source = true },
severity_sort = true, severity_sort = true,
}) })
vim.keymap.set("", "<Leader>tl", function()
local current = vim.diagnostic.config().virtual_text
vim.diagnostic.config({ virtual_text = not current })
end, { desc = "Toggle diagnostics virtual text" })

View File

@@ -1,9 +0,0 @@
return {
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
config = function()
-- lsp_lines
vim.diagnostic.config({ virtual_text = false })
-- --
vim.keymap.set("", "<Leader>tl", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" })
end,
}