vim-lsp registers language servers per filetype and hands you thirty-one commands
async language server protocol plugin for vim and neovim
At a glance
- What is it?
- prabirshrestha/vim-lsp is an asynchronous Language Server Protocol plugin for Vim 8 and Neovim whose hot paths are written in Lua rather than Vim script. The design is deliberately thin: you register servers yourself, three editor features are opt-in wiring, and snippets are three separate plugins you install alongside it.
- Who is it for?
- vim-lsp suits someone who wants language server features in Vim without adopting an editor plugin that owns completion, diagnostics and formatting. It does not suit someone who wants those three working out of the box, since snippets need a second plugin, folding needs three options set by hand, and semantic highlighting needs scopes mapped to highlight groups.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 38 days ago.
- What is it written in?
- Mainly Vim Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 21, 2026, and from our analysis. They are not legal advice.
Star history
- prabirshrestha/vim-lsp3,426 ★ · +6
| Repository | 2026-09-24 | 2026-11-21 |
|---|---|---|
| prabirshrestha/vim-lsp | 3.4k | 3.4k |
6 Stars in the last 58 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Registration is a call guarded by an executable check
The server registration example is worth reading in full because it shows the intended shape. An executable test comes first, so the block only registers a server if the binary is actually on the path, with the package install command sitting in a comment beside it. The registration itself takes a table with three keys that matter: a name identifying the server, a command built from a lookup so the executable name is not repeated, and an allowlist of filetypes. The allowlist is the mechanism that decides when the server starts for a buffer, so a machine with several servers ends up with one per language rather than one per project. An autocommand on a user event is where the buffer-level wiring happens, and that is the subject of the next point rather than of registration itself.
Plug 'prabirshrestha/vim-lsp'A second plugin by another author is referenced as the way to register many servers automatically, and installing both is shown as two adjacent lines, so the intended division of labour is that this plugin does the protocol work and the companion does the bookkeeping.
The buffer autocommand is where the keymaps actually appear
Once a server is live for a buffer, a function hooked to the buffer-enabled event does four things that a user would otherwise have to set by hand on every filetype. It points the completion function at the plugin's own completer. It turns on the sign column so diagnostics are visible. It sets the tag function if the running Vim has that feature at all, guarded by a check for its existence rather than assumed. And it installs buffer-local mappings, in the documented case one lower-case pair to jump to a definition, one to search document symbols, and one capitalised pair to search workspace symbols, with a fourth mapping truncated in the visible text. Because the mappings are buffer-local they only exist where a server is attached, which is the correct scoping and also why nothing appears in a file whose filetype has no server.
Thirty-one commands, and rename picks one server
The command table has thirty-one entries and it is where the plugin's scope becomes visible. Navigation comes in pairs, with a plain form that opens in the current window and a peek form that opens in a preview window, for declarations, definitions, implementations and type definitions alike. Diagnostics are covered in three granularities, with separate commands for errors, for warnings, and for everything including information and hints, each with a next and a previous variant. Beyond that sit code actions, code lenses, document formatting and range formatting, document and workspace symbols, rename, references, hover, a status command, and call and type hierarchies, one of which has an extra variant that adds the result to the current list instead of replacing it. Two notes qualify all of it.
Multiple servers per filetype, but only one answers rename
The first note is that some servers support only part of the command set, so a command that exists in the table may do nothing depending on which server is attached. The second note is the more consequential one. It is possible to register multiple servers for the same filetype, but some commands will pick only the first server that supports them, and the justification given is that it does not make sense for rename and format commands to be sent to more than one server. So the multi-server case is explicitly supported for some operations and explicitly declined for others, and the documentation does not enumerate which is which. That means a configuration with two servers for one language can behave asymmetrically in a way you will have to discover per command.
Snippets are three plugin pairs you install separately
Snippets are the clearest statement of what this plugin does not do. It does not support them by default, and the documentation says so in one line before offering three ways to add them. Each option is a snippet engine plus a small integration plugin written for that engine: one pair built on a snippet plugin with its own integration, one pair built on the widely used snippets engine with an integration plugin for it, and one pair built on the neosnippet plugin with a matching integration. So choosing snippets is really choosing an engine, and the work of wiring it to the language server has already been done by somebody else in each case. The documentation then points you at the readme of whichever pair you picked rather than repeating their configuration.
Diagnostics are on by default and you switch them off to share
Document diagnostics, covering warnings and errors, are enabled by default, which means a fresh install is already showing this plugin's diagnostics. To use a different tool instead you set a variable to zero, and two projects are named as the things you might want in their place. Reference highlighting under the cursor is separately enabled by default with its own variable, and its appearance is controlled through a named highlight group rather than through options, so you either link that group to something of your own or set its terminal and graphical foreground and background colours directly. Three behaviours are therefore independently switchable, and the diagnostic one is the only one that conflicts with another tool.
let g:lsp_diagnostics_enabled = 0 " disable diagnostics supportFolding and semantic highlighting are both manual wiring
Two editor features need setup rather than arriving enabled. Folding is handed to the language server by setting three options: the folding method, an expression that asks the plugin what to fold, and optionally a fold text function. A separate variable disables folding globally, and the help tags for the folding section are referenced. Semantic highlighting is the more constrained of the two, because it depends on an unofficial extension to the protocol rather than on the specification itself, and because the requirements differ by editor: highlights in Neovim, or a Vim compiled with the text property feature. On top of that you have to link the semantic scopes the server emits to your own highlight groups, which is manual work per language.
A standard plugin layout, a minimal config, and no releases
The repository follows the conventional layout for a Vim plugin, with autoload for the functions you call, plugin for the files loaded at startup, ftplugin for per-filetype setup, syntax for the highlighting rules and doc for the help files that all those colon-prefixed references point at. A test directory sits alongside them, and there is a minimal configuration file committed at the root as a starting point rather than only prose instructions. Two files at the root are worth noting for what they imply: a linter configuration for Vim script itself, and a separate licence file covering third-party code, which is common for a plugin that vendors or wraps other people's work. A dependency update tool is also configured. The repository is not archived, its recorded last push is 2026-10-04, and it has no tagged releases at all.
Editorial conclusion
vim-lsp suits someone who wants language server features in Vim without adopting an editor plugin that owns completion, diagnostics and formatting. It does not suit someone who wants those three working out of the box, since snippets need a second plugin, folding needs three options set by hand, and semantic highlighting needs scopes mapped to highlight groups. Before configuring it, decide whether you want its diagnostics or another linter's, because the two cannot both own the same buffer.
Frequently asked questions
what is vim lsp
It is an asynchronous Language Server Protocol plugin for Vim 8 and Neovim, released under the MIT licence. Certain bottlenecks are implemented in Lua, so to get those performance gains you need a Vim compiled with Lua or Neovim 0.4.0 or newer, and installation assumes the vim-plug plugin manager.
how to install vim lsp
Install vim-plug first, then add the plugin declaration line for this repository. A companion plugin by another author can be added the same way and is the documented way to register many language servers automatically instead of writing the registration calls yourself.
How to setup Vim lsp config?
Register each server with the plugin's registration function, giving it a name, a command and an allowlist of filetypes, and guard the call with an executable check. An autocommand on the buffer-enabled event then points completion, the sign column, the tag function and a set of buffer-local mappings at the plugin.
vim lsp vs lspconfig
The project draws no comparison. What it names as its own companion for automatic server setup is a separate plugin by another author, and its own configuration model is a per-server registration call with a filetype allowlist rather than a declarative config file.
vim lsp vs coc
The project draws no comparison with any other plugin. What it states about itself is an async Language Server Protocol plugin for Vim 8 and Neovim, with thirty-one commands, diagnostics enabled by default that can be switched off in favour of another linter, and folding plus semantic highlighting that both need manual wiring before they work.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/prabirshrestha-vim-lsp)Star history chart for your README
[](https://hysenlabs.com/projects/prabirshrestha-vim-lsp)Was this useful?