A Vim and Neovim plugin for the Koja programming language: syntax highlighting, indentation, and :make integration via the koja compiler.
- Filetype detection for
.kojaand.kojs. - Syntax highlighting (keywords, types, strings with interpolation, numbers, annotations, comments).
- Auto-indentation that follows block openers (
fn,if,match,for, …) and dedents onend/else/after/when. matchitsupport — jump between block delimiters (fn…end,if…else…end, …) with%.:makeintegration: runskoja checkand populates the quickfix list with parsed errors and warnings.
This plugin covers syntax and editing only. For language-server features, pair it with koja-lsp through your LSP client (see below).
- Vim or Neovim.
- The
kojacompiler on your$PATHfor:make. Installing Koja via asdf provides it. Otherwise, see the installation guide.
With vim-plug:
Plug 'koja-lang/vim-koja'With lazy.nvim:
{ "koja-lang/vim-koja" }Or without a plugin manager, as a native package:
# Vim
git clone https://github.com/koja-lang/vim-koja ~/.vim/pack/plugins/start/vim-koja
# Neovim
git clone https://github.com/koja-lang/vim-koja ~/.config/nvim/pack/plugins/start/vim-kojaThis plugin handles syntax and indentation only. For diagnostics, completion, and go-to-definition, run the koja-lsp server (installed alongside the koja compiler) through any LSP client — Neovim's built-in LSP, coc.nvim, or vim-lsp. It communicates over stdio and treats the directory containing koja.toml as the project root.
Standard Vim runtimepath layout — the repository root is the plugin:
ftdetect/koja.vim— maps*.koja/*.kojsto thekojafiletype.ftplugin/koja.vim— buffer-local options (indent width, comments,matchitpairs) and selects thekojacompiler.syntax/koja.vim— highlighting rules.indent/koja.vim—indentexpr-based auto-indentation.compiler/koja.vim—makeprganderrorformatfor:make(runskoja check).