Neovim

BlueRune's Neovim (the bluerune-nvim package) is a ready-to-use Neovim: open a file and you get highlighting, a file tree, a picker for files and text, completion, language servers, formatting and git changes beside the lines, in BlueRune's colors. It works offline from the first start.

It has its own config, plugins and data, so a Neovim config of your own in ~/.config/nvim is never read or written.

Install and choose it

sudo pacman -S bluerune-nvim
  • Neovim in the launcher opens it in a Neovide window, with smooth scrolling and cursor.
  • bluerune-nvim opens it in the terminal: bluerune-nvim notes.md. Plain nvim stays your own Neovim.
  • To open text files with it, choose Neovim for Text editor in Settings › Default apps, or tick it on the welcome window's apps page. Mousepad stays the default until you do.

Keys

The leader key is Space. Press it and wait to see every key under it; Space ? shows the keys for the current file.

Keys Does
Space Space Find files
Space / Search text in the folder
Space , Switch buffer
Space e Show or hide the file tree
Space t, or Ctrl+/ Show or hide the terminal (Esc Esc leaves its typing)
Space n New file
Ctrl+S Save
Space q Quit
Space f f, f r, f b Find files, recent files, buffers
Space f g, f w Search text, the word under the cursor
Space f h, f k, f c Find help, keys, commands
Space f d, f s Find diagnostics, symbols
Space f u Undo history
gd, gD, gy, gI Go to definition, declaration, type definition, implementation
gr References
K Documentation under the cursor
Space c a Code action
Space c r Rename symbol
Space c f Format
Space c d Line diagnostics; ]d and [d go to the next and previous one
Space c h Show or hide inlay hints
Space c i Install the language server for this file
Space c m Mason: language servers, formatters and linters
Space g s, g l Git status, log
]h, [h Next and previous change
Space g p, g a, g r Preview, stage, undo the change under the cursor
Space g b Blame line
Space g e Changed files in the file tree
Space b d, b o Close the buffer, the other buffers
Shift+H, Shift+L Previous and next buffer
Ctrl+H, J, K, L Go to the window left, below, above, right
Space w -, w | Split below, right
Alt+J, Alt+K Move the line or selection down, up
Space u w, u l, u s Wrap lines, line numbers, spelling
Space u f Format on save
Space u n Notifications
Space l Plugins

In completion, Tab and Shift+Tab move through the suggestions and Enter takes one. gs adds, changes and deletes surrounding brackets and quotes (gsa, gsr, gsd).

In Neovide, Ctrl+Shift+C and Ctrl+Shift+V copy and paste, and Ctrl+=, Ctrl+- and Ctrl+0 zoom in, out and back.

In the file tree, Enter or l opens, h closes a folder, a adds a file (a name ending in / adds a folder), r renames, d deletes, and ? shows the rest.

Languages

Highlighting works offline for Bash, C, CSS, Go, HTML, JavaScript, JSON, Lua, Markdown, Python, Rust, TOML, TypeScript and YAML. With tree-sitter-cli installed, :TSInstall <language> adds more.

A language server starts with the first file of its language when it is installed, by pacman (for example rust-analyzer or clang) or by Mason. When none is, Neovim says so once: Space c i installs it with Mason, online, and starts it. Servers Mason installs with npm need npm.

Formatting on save uses the language's formatter when it is installed (stylua, ruff, rustfmt, prettier, gofmt, shfmt, taplo, clang-format), else the language server. Space u f turns it off and on.

Colors and font

The colors follow BlueRune's accent color, light or dark, and contrast, and change in a running editor as you change yours. BlueRune writes them to ~/.local/state/bluerune/nvim-palette.lua while Settings › Appearance › Apply theme to other apps is on. Neovide uses the monospace font of Settings › Fonts.

Your own additions

Put them in ~/.config/bluerune-nvim:

  • init.lua runs after BlueRune's config: options, keys, autocommands.
  • Each lua/plugins/*.lua returns lazy.nvim plugin specs, installed online on the next start.

Where things are

Path Holds
/usr/share/bluerune/nvim BlueRune's config, plugins and parsers
~/.config/bluerune-nvim Your additions
~/.local/share/bluerune-nvim Language servers (mason), your plugins, parsers you add
~/.local/state/bluerune-nvim Undo history, shada, logs

To start over, remove the last three folders. Updates come with the package: :Lazy shows BlueRune's plugins as local ones and doesn't update them.