Trld.nvim
No description available
Install / Use
/learn @Mofiqul/Trld.nvimREADME
trld.nvim
Plugin to display neovim line diagnostics on top right conrner with new line
Demo
https://user-images.githubusercontent.com/23612580/164959572-4ab5adad-eed4-46ed-b011-c75700688dfa.mp4
Installation
-- Packer:
use {'Mofiqul/trld.nvim'}
Configuration
require('trld').setup {
-- where to render the diagnostics. 'top' | 'bottom'
position = 'top',
-- if this plugin should execute it's builtin auto commands
auto_cmds = true,
-- diagnostics highlight group names
highlights = {
error = "DiagnosticFloatingError",
warn = "DiagnosticFloatingWarn",
info = "DiagnosticFloatingInfo",
hint = "DiagnosticFloatingHint",
},
-- diagnostics formatter. must return
-- {
-- {{ "String", "Highlight Group Name"}},
-- {{ "String", "Highlight Group Name"}},
-- {{ "String", "Highlight Group Name"}},
-- ...
-- }
formatter = function(diag)
local u = require 'trld.utils'
local diag_lines = {}
for line in diag.message:gmatch("[^\n]+") do
line = line:gsub('[ \t]+%f[\r\n%z]', '')
table.insert(diag_lines, line)
end
local lines = {}
for _, diag_line in ipairs(diag_lines) do
table.insert(lines, { { diag_line .. ' ', u.get_hl_by_serverity(diag.severity) } })
end
return lines
end,
}
You should also disable the neovim default diagnostics virtual text in your config
vim.diagnostic.config({ virtual_text = false })
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
