llm-ls
A language server that connects code editors to LLMs for code completion, handling prompt construction, context-window tokenization and multi-backend model access so editor extensions can stay lightweight.
llm-ls is a Language Server Protocol server that provides LLM-based code completion so that editor extensions built on top of it can stay thin. It builds a fill-in-the-middle or plain completion prompt from the current file, checks the prompt against the model's context window by tokenizing it, and parses the file's AST to decide whether a completion should be multi-line, single-line or empty.
It supports multiple backends, including Hugging Face's Inference API and text-generation-inference, Ollama, and OpenAI-compatible APIs such as the python llama.cpp server bindings, and logs request and completion telemetry locally rather than exporting it. It is used by the llm.nvim, llm-vscode and llm-intellij editor extensions, and the project describes itself as a work in progress.