Terms used • Requirements • Install • Usage • Supported providers
Zana 📦 aims to be like Mason.nvim 🧱, but with the goal of supporting 🌈 not only Neovim, but rather any other editor 🫶.
Zana is swahili for "tools" or "tooling."
Currently, Zana is in early development, but should be considered stable enough for general use.
- Language Server Protocol (LSP): A protocol that defines how code editors and IDEs communicate with language servers.
- Debug Adapter Protocol (DAP): A protocol that defines how code editors and IDEs communicate with debuggers.
- Package: A package is a LSP server, DAP server, formatter or linter that can be installed via Zana.
- Provider: A provider is a package source,
e.g.,
npm,pypi,golang, etc. - Package ID: A package ID is a unique identifier for a package,
e.g.,
npm:@mistweavercokulala-ls@0.1.0. - Zana Registry: The Zana Registry is a registry of available packages that can be installed via Zana.
- Terminal User Interface (TUI): A text-based user interface that runs in a terminal emulator.
A minimal LSP/DAP/formatter/linter package manager uses the Zana Registry to install and manage packages.
Easily install and manage LSP servers, DAP servers, linters, and formatters.
Zana is a CLI, therefore you need to have a terminal emulator available.
Besides that, we shell out a lot to install packages.
E.g. if you want to install npm packages,
you need to have npm installed.
For the packages to work in Neovim, you either need to zana.nvim installed, or source the environment setup in your shell.
source <(zana env)Just head over to the download page or grab it directtly from the releases.
The heart of Zana is its zana-lock.json file.
This file is used to keep track of the installed packages and their versions.
You can tell Zana where to find the zana-lock.json and
the packages by setting the environment variable ZANA_HOME.
If ZANA_HOME isn't set,
Zana will look for the zana-lock.json file in the default locations:
- Linux:
$XDG_CONFIG_HOME/zana/zana-lock.jsonor$HOME/.config/zana/zana-lock.json - macOS:
$HOME/Library/Application Support/zana/zana-lock.json - Windows:
%APPDATA%\zana\zana-lock.json
If the file doesn't exist, Zana will create it for you (when you install a package).
It's advised to keep the zana-lock.json file in version control.
If you want the installed packages to be available in your path, you can add the following to your shell configuration file:
add to ~/.bashrc:
source <(zana env)add to ~/.zshrc:
source <(zana env zsh)or with evalcache for zsh,
add to ~/.zshrc:
_evalcache zana env zshadd to profile:
zana env powershell | Invoke-ExpressionIf you want autocompletion for the CLI commands, you can add the following to your shell configuration file:
add to ~/.bashrc:
source <(zana completion bash)add to ~/.zshrc:
source <(zana completion zsh)add to ~/.config/fish/completions/zana.fish:
zana completion fish > ~/.config/fish/completions/zana.fishadd to profile:
zana completion powershell | Invoke-ExpressionYou can run zana --help to see the available CLI options.
show/info/details shows information about one or more packages.
zana show \
npm:@mistweavercokulala-ls@0.1.0 \
pypi:black \
golang:golangci-lintinstall/add install packages
zana install \
npm:@mistweavercokulala-ls@0.1.0 \
pypi:black \
golang:golangci-lintsync syncs the installed packages or registry data.
For packages,
it'll make sure exactly the same packages are installed
that are listed in the zana-lock.json file.
zana sync packagesFor registry data, it'll update the local registry cache with the latest data from the Zana Registry.
zana sync registryThe registry data is cached locally,
but with the sync registry command you can force an update.
list/ls list all installed packages.
zana listor with --all/-A flag all available packages.
zana list --allYou can also filter packages by prefix of either the package id or name.
# lists all available packages with "yaml" in the name
zana list -A yamlupdate/up updates packages.
zana update \
npm:@mistweavercokulala-ls \
pypi:black@latestYou can also update all packages at once with the --all/-A flag.
zana update --allor filter packages by prefix of either the package id or name.
# updates all installed packages with "yaml" in the name
zana update -A yamlZana can also update itself with:
zana update --selfremove/rm removes packages.
zana remove \
npm:@mistweavercokulala-ls \
pypi:blackor filter packages by prefix of either the package id or name.
# removes all installed packages with "yaml" in the name
zana remove -A yamlhealthchecks for requirements (for shelling out to install packages)
zana healthZana uses a basepath to install packages of different types.
If you have set the ZANA_HOME environment variable,
the basepath will be $ZANA_HOME/packages.
If ZANA_HOME isn't set, the basepath is:
- Linux:
$XDG_DATA_HOME/zana/packagesor$HOME/.local/share/zana/packages - macOS:
$HOME/Library/Application Support/zana/packages - Windows:
%APPDATA%\zana\packages
The packages are installed in the following directory structure:
$basepath/$provider/$package-name/
cargocodebergcomposergemgeneric(shell commands)githubgitlabgolangluarocksnpmnugetopamopenvsxpypi
