neovim
Neovim is a terminal text editor configured in Lua, with a built-in LSP client, Treesitter parsing and, since 0.12, a built-in plugin manager (vim.pack). Use…
by TerminalSkills★ 221 GitHub stars
Install neovim in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Neovim — Lua-configured terminal editor with built-in LSP
Overview
Neovim (nvim) is a Vim-based editor that runs in a terminal and is configured with Lua. It ships an LSP client (diagnostics, go-to-definition, rename, formatting), Treesitter (syntax trees for highlighting, folding and queries) and, from 0.12, vim.pack, a Git-based plugin manager with a lockfile. The current stable line is 0.12.x (0.12.5 at the time of writing).
An agent cannot usefully drive the interactive UI, but it can do most of the setup work: install the binary, write init.lua, pin plugins, configure language servers, check the config for errors and run Neovim headless for batch edits. This skill covers those jobs.
Instructions
Installation
Package managers first; check the version afterwards, because distribution packages often lag behind and vim.pack needs 0.12.
brew install neovim # macOS or Linux with Homebrew
winget install Neovim.Neovim # Windows
sudo pacman -S neovim # Arch
nvim --version | head -1 # expect NVIM v0.12.x
If the distro package is too old, use the official release archive (download, then extract as a separate step):
VER=v0.12.5
curl -LO https://github.com/neovim/neovim/releases/download/$VER/nvim-linux-x86_64.tar.gz
# GitHub records a SHA-256 digest for every release asset; compare before extracting
WANT=$(curl -s https://api.github.com/repos/neovim/neovim/releases/tags/$VER \
| jq -r '.assets[] | select(.name == "nvim-linux-x86_64.tar.gz") | .digest' | cut -d: -f2)
echo "$WANT nvim-linux-x86_64.tar.gz" | sha256sum -c - # must print OK
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
echo 'export PATH="/opt/nvim-linux-x86_64/bin:$PATH"' >> ~/.bashrc
Prepending puts the new binary ahead of an older /usr/bin/nvim. Archives exist for linux-arm64, macos-arm64 and macos-x86_64 too.
Config layout
~/.config/nvim/init.lua— entry point (:echo stdpath('config')shows the real path).~/.config/nvim/lua/<name>.lua— modules loaded withrequire('<name>').~/.config/nvim/lsp/<server>.lua— a language-server config returned as a table.~/.config/nvim/after/lsp/<server>.lua— overrides that win over plugin-provided configs.~/.config/nvim/nvim-pack-lock.json— thevim.packlockfile; commit it with the config.
To try a config without touching the user's, set NVIM_APPNAME: Neovim then reads ~/.config/<name> and keeps separate data and state directories.
NVIM_APPNAME=nvim-trial nvim
Plugins with vim.pack (0.12+)
vim.pack.add() clones missing plugins into the data directory (site/pack/core/opt) and loads them. It needs git and is marked experimental in the docs.
vim.pack.add({
'https://github.com/neovim/nvim-lspconfig',
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter', version = 'main' },
})
vim.pack.update()fetches updates and opens a review buffer::writeapplies,:quitdiscards.vim.pack.update(nil, { force = true })skips the review.vim.pack.update(nil, { target = 'lockfile' })moves plugins back to the lockfile revisions.- To remove a plugin, first delete it from the
add()list and:restart, then runvim.pack.del({ 'plugin-name' }).del()refuses a plugin that is still loaded unless you pass{ force = true }. - Build steps go in a
PackChangedautocommand defined beforevim.pack.add().
Third-party managers such as lazy.nvim still work; do not mix two managers for the same plugin.
Language servers (vim.lsp.config / vim.lsp.enable)
Neovim provides the client; servers are separate programs on PATH. nvim-lspconfig ships ready-made configs in its lsp/ directory, so after installing it one line per server is enough:
vim.lsp.enable({ 'pyright', 'ruff', 'ts_ls', 'lua_ls' })
Customise with vim.lsp.config(); it merges over the plugin's defaults:
vim.lsp.config('lua_ls', {
settings = { Lua = { runtime = { version = 'LuaJIT' } } },
})
vim.lsp.config('pyright', { root_markers = { 'pyproject.toml', '.git' } })
vim.lsp.config('*', { -- fallback for fields a server's own config leaves unset
capabilities = { textDocument = { semanticTokens = { multilineTokenSupport = true } } },
})
'*' has the lowest priority: nvim-lspconfig's lsp/<server>.lua files override it, so setting root_markers there changes nothing. Set root markers per server, as above, or in after/lsp/<server>.lua.
A server that nvim-lspconfig does not know needs cmd, filetypes and root_markers. The old require('lspconfig').<server>.setup{} framework is deprecated; replace each call with vim.lsp.config (settings) plus vim.lsp.enable (activation).
Built-in keymaps once a server attaches: K hover, grn rename, grr references, gri implementation, gra code action, gO document symbols, CTRL-S signature help in insert mode, and CTRL-] jumps to the definition through 'tagfunc'. :lsp restart and `:l
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- _scores.json
FAQ
What does the neovim skill do?
Neovim is a terminal text editor configured in Lua, with a built-in LSP client, Treesitter parsing and, since 0.12, a built-in plugin manager (vim.pack). Use this skill to install Neovim, write or repair an init.lua, add plugins, wire up language servers with vim.lsp.config and vim.lsp.enable, set up format-on-save, or run Neovim headless for scripted edits. Trigger phrases: "set up neovim", "fix my init.lua", "neovim LSP not working", "lspconfig deprecated warning", "add a plugin to nvim", "nvim --headless", "format on save in neovim".
How do I install the neovim skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the neovim skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…