Installation
VS Code Extension
Ki is also available as a Visual Studio Code extension, at https://marketplace.visualstudio.com/items?itemName=ki-editor.ki-editor-vscode.
Build from source with Nix (Recommended)
This is the most reliable installation method as all required dependencies, including system dependencies, will be included automatically.
- Ensure that Nix: the package manager is installed.
- Clone the project:
git clone https://github.com/ki-editor/ki-editor.git
- Run installation:
nix develop --command just install
Build from source without Nix
- Ensure the Rust toolchain is installed using rustup.rs.
- Use Rust 1.89.0:
rustup default 1.89.0
- Install openssl's development package
# Ubuntu
sudo apt install libssl-dev
# Fedora
sudo dnf install openssl-devel
- Clone the project:
git clone https://github.com/ki-editor/ki-editor.git
- Run installation:
cd ki-editor
cargo install typeshare-cli --git https://github.com/tomjw64/typeshare --branch allow-override-for-disallowed-types
cargo install --locked --path .
- The
ki
binary should be installed.
Use nix flake 1
1. Install ki package
- with
nix profile
:
nix profile install github:ki-editor/ki-editor
- or as part of nix configuration, e.g.:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
ki-editor.url = "github:ki-editor/ki-editor";
};
outputs = { nixpkgs, ki-editor, ... }: {
nixosConfigurations."«hostname»" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ environment.systemPackages = [ ki-editor.packages.x86_64-linux.default ] }
./configuration.nix
];
};
};
}
2. Build tree-sitter grammars
This step is optional as most of the Tree-sitter grammars are already linked at build time.
ki @ grammar fetch && ki @ grammar build
Footnotes
-
This flake also provides a basic development environment for Ki Editor which can be enabled by
nix develop
command. ↩