Language server for llama.cpp FIM autocomplete in helix. Fork of https://github.com/ewired/llama.lsp
  • TypeScript 97.5%
  • Python 2.5%
Find a file
2026-07-11 20:22:44 +03:00
.helix organize, improve, port extra chunks functionality from llama.vscode 2026-07-10 21:01:41 +03:00
src Add lru completions cache 2026-07-11 20:22:44 +03:00
.gitignore jsr publish and readme 2026-02-15 00:10:26 -05:00
AGENTS.md setup td 2026-02-13 06:16:42 -05:00
deno.json consistent settings case 2026-02-15 00:13:01 -05:00
deno.lock organize, improve, port extra chunks functionality from llama.vscode 2026-07-10 21:01:41 +03:00
LICENSE jsr publish and readme 2026-02-15 00:10:26 -05:00
README.md add new config options to readme 2026-06-27 16:49:16 +03:00
tail-helix-log organize, improve, port extra chunks functionality from llama.vscode 2026-07-10 21:01:41 +03:00

Llama LSP Server

A Language Server Protocol server providing inline code completions using a llama infill endpoint. Requires Deno, a running llama.cpp server with a model supporting the /infill endpoint, and an LSP client that supports textDocument/inlineCompletion.

Configuration

All settings must be nested under the llamaLsp section (camelCase).

Settings

  • llamaEndpoint (default: http://127.0.0.1:8012/infill)
  • model (default: "")
  • slot (default: -1)
  • nPredict (default: 128)
  • temperature (default: 0.0)
  • topK (default: 40)
  • topP (default: 0.90)
  • debounceMs (default: 150)
  • tMaxPromptMs (default: 500)
  • tMaxPredictMs (default: 1000)

Helix

Note: Requires a fork of Helix with PR #14876 (not yet merged). See: https://github.com/helix-editor/helix/pull/14876

Define the language server in ~/.config/helix/languages.toml:

[language-server.llama-lsp]
command = "deno"
args = ["run", "-A", "jsr:@ewired/llama-lsp", "--stdio"]

Add llama-lsp to the language-servers array for each language in languages.toml:

[[language]]
name = "typescript"
language-servers = [ "typescript-language-server", "deno-lsp", "llama-lsp" ]

Configure settings globally (applies to all languages using this server):

[language-server.llamal-lsp.config.llamaLsp]
llamaEndpoint = "http://127.0.0.1:8012/infill"
nPredict = 128
temperature = 0.0