Files
pmcc 7e6d30c3cd Migrate to chezmoi with per-host sway/waybar configs
- Restructure repo into chezmoi source layout (dot_ prefix)
- Add .chezmoi.toml.tmpl mapping hostname to hosttype (laptop/desktop)
- Template sway config.d fragments (outputs/inputs/binds) per host
- Template waybar config.jsonc with shared bar/module definitions
- Host-scope pulsemeeter (flow) and teams-for-linux (desktop hosts) via .chezmoiignore
- Trim install.sh package lists to configured software + config deps
- Remove stale kitty.conf.bak and untracked host fragments
2026-08-01 22:37:00 -04:00

73 lines
2.3 KiB
Lua

--- diagnostic settings
local map = vim.keymap.set
local palette = {
err = "#51202A",
warn = "#3B3B1B",
info = "#1F3342",
hint = "#1E2E1E",
}
vim.api.nvim_set_hl(0, "DiagnosticErrorLine", { bg = palette.err, blend = 20 })
vim.api.nvim_set_hl(0, "DiagnosticWarnLine", { bg = palette.warn, blend = 15 })
vim.api.nvim_set_hl(0, "DiagnosticInfoLine", { bg = palette.info, blend = 10 })
vim.api.nvim_set_hl(0, "DiagnosticHintLine", { bg = palette.hint, blend = 10 })
vim.api.nvim_set_hl(0, "DapBreakpointSign", { fg = "#FF0000", bg = nil, bold = true })
vim.fn.sign_define("DapBreakpoint", {
text = "●", -- a large dot; change as desired
texthl = "DapBreakpointSign", -- the highlight group you just defined
linehl = "", -- no full-line highlight
numhl = "", -- no number-column highlight
})
local sev = vim.diagnostic.severity
vim.diagnostic.config({
-- keep underline & severity_sort on for quick scanning
underline = true,
severity_sort = true,
update_in_insert = false, -- less flicker
float = {
border = "rounded",
source = true,
},
-- keep signs & virtual text, but tune them as you like
signs = {
text = {
[sev.ERROR] = " ",
[sev.WARN] = " ",
[sev.INFO] = " ",
[sev.HINT] = "󰌵 ",
},
},
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "●",
},
-- NEW in 0.11 — dim whole line
linehl = {
[sev.ERROR] = "DiagnosticErrorLine",
[sev.WARN] = "DiagnosticWarnLine",
[sev.INFO] = "DiagnosticInfoLine",
[sev.HINT] = "DiagnosticHintLine",
},
})
-- diagnostic keymaps
local diagnostic_goto = function(next, severity)
severity = severity and vim.diagnostic.severity[severity] or nil
return function()
vim.diagnostic.jump({ count = next and 1 or -1, float = true, severity = severity })
end
end
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
map("n", "]d", diagnostic_goto(true), { desc = "Next Diagnostic" })
map("n", "[d", diagnostic_goto(false), { desc = "Prev Diagnostic" })
map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })