LogiShell docs Open app

Neovim in LogiShell

The Vim tab of the bottom panel is a real Neovim. It runs on your computer, on the file that is open in the editor, and what you save there shows in the editor at once.

Neovim has a reputation: you open it and nothing you type does what you expect. So the tab starts it with a LogiShell setup: the bottom line always says in words what mode you are in, Space opens a menu of what you can do, and one key shows every key that matters.

You need Neovim on the computer. If it is not there, the tab says so: install the package neovim (with Homebrew, apt, dnf or winget) and press Try again.

The first time, the computer downloads the setup (one small file) from LogiShell and checks it before using it. If it cannot, for example with no network, the tab starts the computer's own Neovim, says *LogiShell setup needs the network once*, and tries again on the next start.

The ten keys

KeyWhat it does
iStart typing. The bottom line says INSERT: you are typing.
EscStop typing. The bottom line says NORMAL: keys are commands.
uUndo. Ctrl+r brings it back.
Space wSave.
Space qClose. If something is not saved, Neovim asks first.
Space eFile list on the left. Enter opens a file.
Space fFind a file by a part of its name.
Space /Search in all files.
vSelect. Then y copies, d cuts, and p pastes.
Space ?A page with all of these keys. q closes it.

One more for later: Space l turns on language help for the project you are in (see below).

The mouse works: click to move the cursor, drag to select, scroll with the wheel. Ctrl+s saves too.

If you forget everything else, remember two things: Esc gets you back to safety, and Space ? shows the keys. The same keys are listed under the tab.

What the setup contains

Everything in the first list works at once, with no network and nothing to install:

When the computer can reach github.com, the setup adds a short list of extras in the background. The first start says Setting up extras, a minute in the bottom line and you can type meanwhile. On our test computer it took about twelve seconds. Without a network you see *Extras are not installed yet: no network*, everything in the first list still works, and the next start with a network tries again. Nothing is compiled on your computer.

ExtraWhat you get
which-keyPress Space and wait a moment: a list of what comes next.
nvim-treeThe file list of Space e as a tree.
telescope (with plenary)Space f and Space / with a live preview. Search in files needs ripgrep on the computer; without it the built in search is used.
lazy.nvimThe manager that fetches the ones above.

Every extra is pinned to one exact commit, so nothing on your computer follows a moving branch. The list and the hashes are in the config file itself. Code is coloured by Neovim's built in syntax for now.

Language help, when you ask for it

If a language server is already installed on the computer (for TypeScript, Go, Python, Rust, Lua or C), Neovim can use it: gd goes to a definition, K explains the word under the cursor, Space r renames, Space a offers quick fixes.

It never starts by itself. A language server runs the project's own tooling (its build scripts, its own copy of TypeScript), so opening a file from a project you do not know must not start one. Press Space l in a file: Neovim names the server and asks. Yes turns it on for that project until you close Neovim. LogiShell does not install language servers.

For the same reason a file cannot change Neovim's settings from inside (modelines are off), and a config file lying in a project folder is not read.

Your own Neovim is not touched

The setup lives under a name of its own, logishell-nvim:

The config is downloaded from the address of the LogiShell app you are using and its checksum is compared with the one the app names before the file is put in place. Nothing from the download is run by the shell.

Your own ~/.config/nvim is never read and never written. Nothing is installed outside those folders, and nothing needs administrator rights. To remove the setup, delete the three folders.

LogiShell replaces its init.lua when a newer one ships. Your own additions go into ~/.config/logishell-nvim/lua/user.lua: that file is loaded last and is never overwritten.

Use your own Neovim instead

If you already have a Neovim you like, open the chooser in the tab's bar and pick My own Neovim. The tab then starts Neovim exactly as the computer has it set up. The choice is remembered per computer, so a fresh server can keep the LogiShell setup while your laptop keeps yours.

A Neovim that is already running keeps its setup. The bar offers Restart with ...; save first, because unsaved changes are lost with the restart.

On a Windows computer the tab runs your own Neovim for now.

Files from the editor

When you open another file in the editor while Neovim is running, the bar offers Open (file) here. If you want that to happen by itself, switch on Follow the editor in the bar.

LogiShell opens the file by typing one short command into Neovim for you. It does that only into a Neovim with the LogiShell setup that this window saw start, and only while Neovim is on screen. In every other case (your own Neovim, a tab that was open before you reloaded the page) Open (file) here starts Neovim again on that file instead, and tells you first that unsaved changes would be lost. After you close Neovim with Space q the bar says so and offers Open Neovim again.

When something looks wrong