From f5293ebf19036b54d5bb3811a4ca3c9643643830 Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 8 Feb 2025 21:18:28 -0500 Subject: [PATCH] add tiny-inline-diagnostic plugin --- lua/data/types.lua | 25 +++++++++++++++++++++++++ lua/plugins/coding.lua | 10 +++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/lua/data/types.lua b/lua/data/types.lua index 942c4aa..c4e2a5d 100644 --- a/lua/data/types.lua +++ b/lua/data/types.lua @@ -1906,6 +1906,31 @@ M.symbols = { end, } +-- Tiny Inline Diagnostic config +M.tiny_inline_diagnostic = { + config = function() + require('tiny-inline-diagnostic').setup({ + -- Style preset for diagnostic messages + -- Available options: + -- "modern", "classic", "minimal", "powerline", + -- "ghost", "simple", "nonerdfont", "amongus" + preset = 'modern', + options = { + overflow = { + -- Trigger wrapping to occur this many characters earlier when mode == "wrap". + -- Increase this value appropriately if you notice that the last few characters + -- of wrapped diagnostics are sometimes obscured. + padding = 20, + }, + }, + }) + vim.api.nvim_create_autocmd('LspAttach', { + callback = function() + vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics + end, + }) + end, +} --- Todo-comments plugin options M.todo = { opts = { diff --git a/lua/plugins/coding.lua b/lua/plugins/coding.lua index d28fd29..1a8b98b 100644 --- a/lua/plugins/coding.lua +++ b/lua/plugins/coding.lua @@ -68,11 +68,11 @@ return { keys = require('data.keys').easyalign, }, { - config = function() - }, - }, - }) - end, + 'rachartier/tiny-inline-diagnostic.nvim', + event = 'VeryLazy', -- Or `LspAttach` + priority = 1000, -- needs to be loaded in first + cond = require('data.cond').tiny_inline_diagnostic, + config = require('data.types').tiny_inline_diagnostic.config, }, -- { -- Vim-Shebang -- 'vitalk/vim-shebang',