Neovim Diagnostics API Reference

SkillAI & models

Lets your agent read and fix code diagnostics inside Neovim.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Neovim Diagnostics API Reference skill

About this capability

Neovim AI agent done right

What this skill tells your AI

The instructions your AI receives, as published by theprimeagen/99 in .agents/skills/vim.diagnostics/SKILL.md and read by ahel’s review.

This document contains function definitions for Neovim's diagnostics Lua API. Use this as a reference when working with diagnostics in Neovim Lua.


diagnostic

vim.diagnostic APIs, types, and helpers.

function get_qf_id_for_title(title)
function __newindex(t, name, handler)
function __index(t, bufnr)
function callback()
function to_severity(severity)
function severity_predicate(severity)
function filter_by_severity(severity, diagnostics)
function count_sources(bufnr)
function prefix_source(diagnostics)
function reformat_diagnostics(format, diagnostics)
function enabled_value(option, namespace)
function resolve_optional_value(option, value, namespace, bufnr)
function get_resolved_options(opts, namespace, bufnr)
function make_highlight_map(base_name)
function diagnostic_lines(diagnostics)
function diagnostics_at_cursor(diagnostics)
function set_diagnostic_cache(namespace, bufnr, diagnostics)
function restore_extmarks(bufnr, last)
function save_extmarks(namespace, bufnr)
function on_lines(_, _, _, _, _, last)
function on_detach()
function severity_to_extmark_priority(priority, opts)
function make_augroup_key(namespace, bufnr)
function execute_scheduled_display(namespace, bufnr)
function schedule_display(namespace, bufnr, args)
function clear_scheduled_display(namespace, bufnr)
function get_diagnostics(bufnr, opts, clamp)
function __index(t, k)
function add(b, d)
function add_all_diags(buf, diags)
function set_list(loclist, opts)
function filter_highest(diagnostics)
function next_diagnostic(search_forward, opts)
function sort_diagnostics(a, b)
function is_next(d)
function goto_diagnostic(diagnostic, opts)
function M.config(opts, namespace)
function M.set(namespace, bufnr, diagnostics, opts)
function M.get_namespace(namespace)
function M.get_namespaces()
function M.get(bufnr, opts)
function M.count(bufnr, opts)
function M.get_prev(opts)
function M.get_prev_pos(opts)
function M.goto_prev(opts)
function M.get_next(opts)
function M.get_next_pos(opts)
function M.jump(opts)
function M.goto_next(opts)
function show(namespace, bufnr, diagnostics, opts)
function hide(namespace, bufnr)
function render_virtual_text(namespace, bufnr, diagnostics, opts)
function distance_between_cols(bufnr, lnum, start_col, end_col)
function render_virtual_lines(namespace, bufnr, diagnostics)
function format_virtual_lines(diagnostic)
function M._get_virt_text_chunks(line_diags, opts)
function M.hide(namespace, bufnr)
function M.is_enabled(filter)
function M.is_disabled(bufnr, namespace)
function M.show(namespace, bufnr, diagnostics, opts)
function M.open_float(opts, ...)
function M.reset(namespace, bufnr)
function M.setqflist(opts)
function M.setloclist(opts)
function M.disable(bufnr, namespace)
function M.enable(enable, filter)
function __index()
function M.match(str, pat, groups, severity_map, defaults)
function M.toqflist(diagnostics)
function M.fromqflist(list)

Signals

GitHub stars
5k
Forks
263
Last commit
Jun 2026

Others that do the same job

Advanced
Catalog kind
skill
Gateway key
vim-diagnostics
Source
github.com/theprimeagen/99