vim-lsp

Document Neovim's vim.lsp API functions, arguments, and submodules.

Updated Oct 2, 2024
One-click install
npx skills add https://github.com/A-NGJ/dotfiles --skill vim-lsp-a-ngj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vim-lsp
Source: https://github.com/A-NGJ/dotfiles/tree/main/claude/.claude/skills/vim-lsp
Command: npx skills add https://github.com/A-NGJ/dotfiles --skill vim-lsp-a-ngj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference for Neovim's vim.lsp API, helping users understand and configure Language Server Protocol (LSP) integration within Neovim.

Core Features & Use Cases

  • API Reference: Detailed documentation for all vim.lsp functions, arguments, and submodules.
  • Configuration Guidance: Assists in setting up LSP clients, keybindings, and understanding LSP-related Neovim commands.
  • Use Case: A user is trying to configure Neovim to use a specific language server and needs to know the correct vim.lsp.start options or how to handle vim.lsp.buf.code_action.

Quick Start

Refer to the vim.lsp.buf.definition function to find the definition of the current symbol.

Frequently Asked Questions about vim-lsp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Neovim LSP keybindings for code actions and definitions?

To configure Neovim LSP keybindings, use the `vim.lsp.buf` submodule to map functions like `code_action` or `definition`. This Skill provides the complete API reference for understanding these arguments and setting up LSP client commands.

What is the correct way to start a language server using the vim.lsp API?

The correct way to start a language server is by using the `vim.lsp.start` function with the appropriate configuration options. This Skill details the required arguments and configuration guidance for initializing LSP clients in Neovim.

How do inlay hints and semantic tokens work in Neovim's LSP integration?

Inlay hints and semantic tokens are features of Neovim's LSP integration exposed through the `vim.lsp` API. This reference explains how these submodules function and how to implement them in your Neovim configuration.

Does this vim.lsp reference cover Neovim commands for codelens setup?

Yes, this vim.lsp reference covers Neovim commands for codelens setup. It provides detailed documentation on `vim.lsp` functions, arguments, and submodules to help you understand and configure LSP-related features like codelens.

What are the limitations of using the vim.lsp API directly for Neovim configuration?

The vim.lsp API provides direct access to LSP functions and submodules, but requires manual configuration of arguments and keybindings. This Skill serves as a reference for understanding these mechanisms, though it focuses on API documentation rather than automated setup.