mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
add better diagnostics plugin
This commit is contained in:
@@ -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" },
|
||||||
|
|||||||
@@ -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" })
|
|
||||||
|
|||||||
@@ -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,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user