LLeMbas IDE

LLeMbas in your editor: a Neovim plugin, and a VS Code / VSCodium extension.

Both are clients of the LLeMbas CLI. The CLI is the agent: it holds the sign-in to your LLeMbas server, the models, the tools and the permissions. The editor starts lembas serve --stdio and talks to it over the Agent Client Protocol. Nothing about a server or a model is set in the editor.

This is a beta. It needs LLeMbas CLI 2.0.0-beta.16 or newer on the same computer. With an older CLI the editor says so once, with how to update it (lembas update), and what that CLI lacks is off.

The CLI has to be signed in to your LLeMbas server. You can do that from the editor — :LLeMbasLogin in Neovim, LLeMbas: Sign In in VS Code — or in a terminal with lembas login <address>. It is the same sign-in either way: the CLI keeps one for the whole computer, which the terminal and the linked service use too, so signing in to another server from the editor replaces it (the editor says whose it replaces and asks first).

If the editor does not find lembas (an editor started from the desktop does not always have your shell's PATH) it also looks in ~/.local/bin, where the CLI's installer puts it; anywhere else, set the command to the program's full path (cmd in Neovim's setup, LLeMbas: Command in VS Code).

LLeMbas IDE: the whole editor, one script

A complete Neovim IDE with LLeMbas built in, installed for one user by one script: a pinned Neovim, a ready configuration (explorer, fuzzy finder, Treesitter, language servers, completion, git, sessions, key hints), the LLeMbas theme and the plugin below. It keeps its own directories and never touches a Neovim configuration of your own.

curl -fsSL https://github.com/LLeMbas/LLeMbas-IDE/releases/latest/download/install.sh | bash
llembas-ide

What it installs and where, the keys, how to make it yours, updating, removing and what leaves the machine: ide/README.md. The installer is ide/install.sh; scripts/test-ide.sh tests it and scripts/package-ide.sh writes its release files.

Neovim

Needs Neovim 0.10 or newer. The plugin lives in nvim/, so the runtime path points there.

lazy.nvim:

{
  "LLeMbas/LLeMbas-IDE",
  branch = "dev",
  config = function(plugin)
    vim.opt.rtp:append(plugin.dir .. "/nvim")
    vim.cmd("runtime plugin/llembas.lua")
    vim.cmd("silent! helptags " .. plugin.dir .. "/nvim/doc")  -- so that :help llembas works
    require("llembas").setup({})
  end,
}

vim-plug: Plug 'LLeMbas/LLeMbas-IDE', { 'branch': 'dev', 'rtp': 'nvim' } (it makes the help tags itself). By hand: add the checkout's nvim folder to runtimepath and run :helptags <checkout>/nvim/doc once.

Command What it does
:LLeMbas open or close the chat panel (right, left, bottom, or float)
:'<,'>LLeMbasAsk [question] ask about the selected lines; without a question they go with the next message
:'<,'>LLeMbasExplain explain the selected lines
:'<,'>LLeMbasEdit [instruction] rewrite the selected lines as inline hunks (ga/gr, gA/gR, ]h/[h)
:LLeMbasGenerate [instruction] generate code at the cursor as inline hunks
:LLeMbasCancelEdit cancel an in-flight rewrite or generation
:LLeMbasFix send the current buffer's diagnostics to the agent to fix
:LLeMbasAccept[!], :LLeMbasReject[!] accept or reject proposed changes (!: all)
:LLeMbasNextHunk, :LLeMbasPrevHunk jump between proposed changes (]h, [h)
:LLeMbasAutocomplete [on|off] toggle suggestions as you type
:LLeMbasAutocompleteTokens [N|auto|words|line|block|file] tune autocomplete max tokens and prediction length preset
:LLeMbasAutocompleteInstructions [text|-] set or clear custom instructions sent with autocomplete
:LLeMbasAutocompleteModel[!] [model] the model that writes suggestions (!: this editor only; -: back to default)
:LLeMbasMainModel [model] the model for chat and rewriting, saved in your account (? shows both)
:LLeMbasFiles[!] [name] find a project file by part of its name and insert @path (!: open it); asks for the name when none is given
:LLeMbasOpenFile [query] open a file from the project index
:LLeMbasCommands pick a session /command or skill
:LLeMbasSessions list and resume a previous session with its history
:LLeMbasCompact compact the session context
:LLeMbasToggleThoughts show or hide model thinking
:LLeMbasOpen open the file the agent showed last
:LLeMbasStop stop the running turn
:LLeMbasNew[!] start a new session (! ends a hung turn)
:LLeMbasMode [mode] change the mode (works live mid-turn)
:LLeMbasModel [model] pick or change the session's model
:LLeMbasLogin [address] [--ca file] sign this computer in to a LLeMbas server: shows the code, opens the approval page (:LLeMbasLoginCancel stops waiting)
:LLeMbasLogout sign this computer out (the terminal and the linked service with it)
:LLeMbasRestart stop the agent; it starts again when it is needed
:LLeMbasLog what the agent wrote on stderr (why it stopped, when it did)
:LLeMbasStatus, :LLeMbasHelp floating status overview / commands & keys card

In the prompt: <CR> (normal mode) or <C-s> sends (or steers mid-turn), <C-c> stops the turn, <C-x><C-f> inserts @file, <C-x><C-o> inserts /command, q closes, g? opens help. In the transcript: <CR> / gf opens file:line, K inspects tool output in a float, y yanks the fenced code block under the cursor, i jumps to the prompt, q closes.

While typing, <Tab> accepts a suggestion, <M-Right> accepts the next word, and <M-\> triggers one manually; all keys and LLeMbas* highlight groups can be customized. require("llembas").statusline() provides a compact statusline component. Help: :help llembas.

VS Code and VSCodium

Needs VS Code or VSCodium 1.85 or newer. The extension lives in vscode/; it is plain JavaScript with no dependencies, and is installed from a package you build with Node alone:

scripts/package-vscode.sh                                   # writes dist/llembas-<version>.vsix
codium --install-extension dist/llembas-<version>.vsix      # or: code --install-extension …

Includes a redesigned sidebar chat with interactive approval, question and plan cards, real GFM tables, code-block Copy/Insert toolbars, collapsible thinking and tool output, session resume and compaction, @file and /command popups, inline diff rewrites and generation, inline autocomplete with a Tune drawer (max-tokens slider, length presets, and custom instructions), and shown media. Commands, keys, and settings: vscode/README.md.

Tests

scripts/test-nvim.sh runs the plugin headless (needs nvim 0.10+ and python3). scripts/test-vscode.sh runs the extension's parts that need no editor, and checks the package and the vscode API it uses against the version it says it needs (Node 18 or newer and python3). It does not start VS Code.

Both run against the same stand-in agent, tests/fake_agent.py, which answers only in the shapes the LLeMbas CLI answers in and checks what it is sent as the CLI does; tests/fake_lembas.py stands in for lembas login and lembas logout. When the CLI's source is at hand — a LLeMbas-CLI checkout beside this repository, or wherever LEMBAS_CLI_SOURCE points, with its dependencies installed and bun on the PATH — both suites also start the CLI itself, with a home of its own (LEMBAS_HOME), so that it is never signed in and never touches your sessions: the hello, what needs no sign-in, and that "not signed in" ends in an instruction. Without it they say that they skipped that part (LEMBAS_SKIP_REAL_CLI=1 skips it on purpose).

Licence

MIT.

S
Description
LLeMbas in the editor: a Neovim plugin and a VS Code / VSCodium extension on the LLeMbas CLI
Readme MIT
2.4 MiB
0 Stars 2 Watchers 0 Forks
Languages
Lua 85.3%
Python 11.6%
Shell 3.1%