Neovim LSP API Reference

SkillDev tools

A skill for dev tools by theprimeagen.

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 LSP API Reference skill

What this skill tells your AI

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

This document contains function definitions from Neovim's LSP help docs. Use this as a reference when working with LSP in Neovim Lua.


lsp

Functions extracted from lsp.txt.

vim.lsp.buf_attach_client({bufnr}, {client_id})
vim.lsp.buf_detach_client({bufnr}, {client_id})
vim.lsp.buf_is_attached({bufnr}, {client_id})
vim.lsp.buf_notify({bufnr}, {method}, {params})
vim.lsp.buf_request_all({bufnr}, {method}, {params}, {handler})
vim.lsp.buf_request_sync({bufnr}, {method}, {params}, {timeout_ms})
vim.lsp.client_is_stopped({client_id})
vim.lsp.config({name}, {cfg})
vim.lsp.enable({name}, {enable})
vim.lsp.foldclose({kind}, {winid})
vim.lsp.foldexpr({lnum})
vim.lsp.foldtext()
vim.lsp.formatexpr({opts})
vim.lsp.get_buffers_by_client_id({client_id})
vim.lsp.get_client_by_id({client_id})
vim.lsp.get_clients({filter})
vim.lsp.get_log_path()
vim.lsp.is_enabled({name})
vim.lsp.omnifunc({findstart}, {base})
vim.lsp.set_log_level({level})
vim.lsp.start({config}, {opts})
vim.lsp.status()
vim.lsp.stop_client({client_id}, {force})
vim.lsp.tagfunc({pattern}, {flags})
vim.lsp.buf.add_workspace_folder({workspace_folder})
vim.lsp.buf.clear_references()
vim.lsp.buf.code_action({opts})
vim.lsp.buf.declaration({opts})
vim.lsp.buf.definition({opts})
vim.lsp.buf.document_highlight()
vim.lsp.buf.document_symbol({opts})
vim.lsp.buf.format({opts})
vim.lsp.buf.hover({config})
vim.lsp.buf.implementation({opts})
vim.lsp.buf.incoming_calls()
vim.lsp.buf.list_workspace_folders()
vim.lsp.buf.outgoing_calls()
vim.lsp.buf.references({context}, {opts})
vim.lsp.buf.remove_workspace_folder({workspace_folder})
vim.lsp.buf.rename({new_name}, {opts})
vim.lsp.buf.signature_help({config})
vim.lsp.buf.type_definition({opts})
vim.lsp.buf.typehierarchy({kind})
vim.lsp.buf.workspace_symbol({query}, {opts})
vim.lsp.diagnostic.from({diagnostics})
vim.lsp.diagnostic.get_namespace({client_id}, {is_pull})
vim.lsp.diagnostic.on_diagnostic({error}, {result}, {ctx})
vim.lsp.diagnostic.on_publish_diagnostics({_}, {params}, {ctx})
vim.lsp.codelens.clear({client_id}, {bufnr})
vim.lsp.codelens.display({lenses}, {bufnr}, {client_id})
vim.lsp.codelens.get({bufnr})
vim.lsp.codelens.on_codelens({err}, {result}, {ctx})
vim.lsp.codelens.refresh({opts})
vim.lsp.codelens.run()
vim.lsp.codelens.save({lenses}, {bufnr}, {client_id})
vim.lsp.completion.enable({enable}, {client_id}, {bufnr}, {opts})
vim.lsp.completion.get({opts})
vim.lsp.inlay_hint.enable({enable}, {filter})
vim.lsp.inlay_hint.get({filter})
vim.lsp.inlay_hint.is_enabled({filter})
vim.lsp.semantic_tokens.force_refresh({bufnr})
vim.lsp.semantic_tokens.get_at_pos({bufnr}, {row}, {col})
vim.lsp.semantic_tokens.highlight_token({token}, {bufnr}, {client_id}, {hl_group}, {opts})
vim.lsp.semantic_tokens.start({bufnr}, {client_id}, {opts})
vim.lsp.semantic_tokens.stop({bufnr}, {client_id})
vim.lsp.util.apply_text_document_edit({text_document_edit}, {index}, {position_encoding})
vim.lsp.util.apply_text_edits({text_edits}, {bufnr}, {position_encoding})
vim.lsp.util.apply_workspace_edit({workspace_edit}, {position_encoding})
vim.lsp.util.buf_clear_references({bufnr})
vim.lsp.util.buf_highlight_references({bufnr}, {references}, {position_encoding})
vim.lsp.util.character_offset({buf}, {row}, {col}, {offset_encoding})
vim.lsp.util.convert_input_to_markdown_lines({input}, {contents})
vim.lsp.util.convert_signature_help_to_markdown_lines({signature_help}, {ft}, {triggers})
vim.lsp.util.get_effective_tabstop({bufnr})
vim.lsp.util.locations_to_items({locations}, {position_encoding})
vim.lsp.util.make_floating_popup_options({width}, {height}, {opts})
vim.lsp.util.make_formatting_params({options})
vim.lsp.util.make_given_range_params({start_pos}, {end_pos}, {bufnr}, {position_encoding})
vim.lsp.util.make_position_params({window}, {position_encoding})
vim.lsp.util.make_range_params({window}, {position_encoding})
vim.lsp.util.make_text_document_params({bufnr})
vim.lsp.util.make_workspace_params({added}, {removed})
vim.lsp.util.open_floating_preview({contents}, {syntax}, {opts})
vim.lsp.util.preview_location({location}, {opts})
vim.lsp.util.rename({old_fname}, {new_fname}, {opts})
vim.lsp.util.show_document({location}, {position_encoding}, {opts})
vim.lsp.util.stylize_markdown({bufnr}, {contents}, {opts})
vim.lsp.util.symbols_to_items({symbols}, {bufnr}, {position_encoding})
vim.lsp.log.get_filename()
vim.lsp.log.get_level()
vim.lsp.log.set_format_func({handle})
vim.lsp.log.set_level({level})
vim.lsp.log.should_log({level})
vim.lsp.rpc.connect({host_or_path}, {port})
vim.lsp.rpc.format_rpc_error({err})
vim.lsp.rpc.notify({method}, {params})
vim.lsp.rpc.request({method}, {params}, {callback}, {notify_reply_callback})
vim.lsp.rpc.rpc_response_error({code}, {message}, {data})
vim.lsp.rpc.start({cmd}, {dispatchers}, {extra_spawn_params})
vim.lsp.protocol.make_client_capabilities()
vim.lsp.protocol.resolve_capabilities({server_capabilities})

Signals

GitHub stars
233
Forks
5
Last commit
Feb 2026

ahel recommends instead

Advanced
Catalog kind
skill
Gateway key
vim-lsp-theprimeagen
Source
github.com/theprimeagen/skills