NEOVIM PLUGIN (MOJO) โ€” LUA

Blaze.nvim

Blaze.nvim

Version 1.00Source on GitHub

OVERVIEW

Blaze.nvim is "a blazingly fast mojo.vim fork" for Neovim that provides syntax highlighting, indentation, Tree-sitter, formatting, linting, debugging (DAP) and LSP integration for Mojo and `*.๐Ÿ”ฅ` files. The README marks it "Under Active development expect breaking changes until stable release."

HOW IT WORKS

  1. 1Add the plugin for the `mojo`/`๐Ÿ”ฅ` filetypes (lazy.nvim `{ "qompassai/blaze.nvim" }`, or the packer spec with `blaze-ts.nvim`, `nvim-lspconfig`, `nvim-dap`, `nvim-dap-ui` and `nvim-dap-python`), then call `require("blaze").setup()`. Source: GitHub blaze.nvim README.md.
  2. 2On setup, enabled subsystems wire up in order: LSP servers if `lsp.enabled`, Pixi if `pixi.enabled`, Magic if `magic.enabled`, and the emoji filetype extension if `filetypes.emoji_extension`; a FileType autocmd applies the configured indentation to Mojo buffers. Source: primo clone `~/.GH/Qompass/blaze.nvim/lua/blaze/init.lua`.
  3. 3Syntax highlighting comes from Tree-sitter via `blaze-ts.nvim` when available; otherwise the fallback sets `vim.g.mojo_highlight_all` and loads the bundled syntax file on FileType. Source: primo clone `lua/blaze/init.lua` (`blaze_syntax`).
  4. 4Formatting uses `mojo format` (the ๐Ÿ”ฅ-fmt cheat-sheet entry) with on-save formatting; linting integrates with `nvim-lint`/null-ls; debugging is set up via `nvim-dap`. Sources: GitHub blaze.nvim README.md feature list; `docs/blaze.txt` cheat sheet.
  5. 5`:Fever` runs the health check, reporting Tree-sitter parser availability, Mojo file detection, and ๐Ÿ”ฅ-ls / ๐Ÿ”ฅ-fmt / ๐Ÿ”ฅ-lint / ๐Ÿ”ฅ-dap availability. Sources: GitHub blaze.nvim README.md; `docs/blaze.txt`.
How it works, step by step โ€” each step as the project's own documentation states it.

CONCEPTS

ONE .MOJO BUFFER โ€” FIVE SUBSYSTEMS WIREDBUFFER: *.mojo / *.๐Ÿ”ฅFileType autocmd fires on openTREE-SITTERblaze-ts.nvimhighlightingfallback: bundledsyntax fileLSPMojo LSP serverdiagnosticslsp.enabledFORMATTERmojo formaton saveline_length 88format_on_saveLINTERnvim-lintnull-lsenable_lintingDAPnvim-dapdebug adapterdap.enabledSETUP ORDER โ€” THE BLAZE SETUP CALLLSP servers โ†’ Pixi โ†’ Magic โ†’ ๐Ÿ”ฅ filetype, then indentation per buffer:Fever โ€” health check, whole stack
One Mojo buffer, wired five ways: filetype detection for *.mojo (and the fire-emoji extension) fans out to Tree-sitter highlighting via blaze-ts.nvim โ€” with the bundled syntax file as fallback โ€” the Mojo LSP server, mojo format on save, linting, and DAP debugging, the subsystems the plugin's setup enables in order. Defaults shown are the plugin's own configuration values.

CONFIGURATION

OptionDefaultWhat it does
formatting.format_on_savetrueFormat Mojo files on save (nested under `formatting` in the defaults table)
line_length88Formatter line length (also `formatting.line_length = 88`)
enable_lintingtrueEnable linting integration
dap.enabledtrueEnable DAP debugging setup
lsp.enabledtrueEnable LSP integration (`lsp.mojo.enabled = true` nested)
indentation.expandtabtrueExpand tabs for Mojo buffers
indentation.shiftwidth4Indent width for Mojo buffers
filetypes.emoji_extensiontrueTreat the `๐Ÿ”ฅ` extension as the Mojo filetype
pixi.enabledtrueEnable Pixi integration (`auto_detect = true`)
pixi.keymaps.prefix<leader>pPrefix for Pixi keymaps (`pixi.keymaps.enabled = true`)
pixi.display.method / height / width`float` / 15 / 80Pixi output display (options: `split`, `vsplit`, `float`, `notify`)
magic.enabledtrueEnable Modular Magic integration (`show_output = true`, `commands.list = true`)
syntax.enabledtrueEnable syntax subsystem (`syntax.treesitter.enabled = true`; fallback enabled with `highlight_all = true`)
keymapstrue (in README example)Optional which-key mappings, passed to `require("blaze.config").setup({...})` in the README's manual-setup example

CONTROLS

ActionControl
Run health check:Fever
Format Mojo file (which-key, when `keymaps = true`)<leader>fm
Run healthcheck via `:Fever` (which-key, when `keymaps = true`)<leader>fh
Format current file (example mapping in the manual)`<leader>fm` via `vim.lsp.buf.format()` (labelled "just examples" in the doc)
Show Blaze status in lualine`require("blaze.lualine").blaze_status` in `lualine_c` (README: "Still in development")

NOT COVERED

- Config shape discrepancy, both sourced: the defaults table in `lua/blaze/config.lua` nests on-save formatting as `formatting.format_on_save`, while the README's manual-setup example passes flat `format_on_save = true, enable_linting = true, keymaps = true` to `require("blaze.config").setup(...)`. No source read reconciles the two shapes. - Only two which-key mappings (`<leader>fm`, `<leader>fh`) are documented; the Pixi keymaps behind the `<leader>p` prefix are not enumerated in any source read. - LSP buffer mappings (`gd`, `K`, `<leader>rn`, etc.) appear in the Diver-side lazy spec fetched as blaze.nvim's `lazy.lua` (file header: `/qompassai/diver/lua/plugins/lang/mojo.lua`), i.e. they belong to Diver's Mojo spec, not to blaze.nvim itself, so they are not listed as blaze controls. - No standalone install/usage documentation beyond the README and the short `docs/blaze.txt` manual was sourced.

REFERENCES

  1. Mojo manual (Modular)The language reference for the Mojo this plugin supports; its formatter (mojo format) and language server are the toolchain Blaze wires into the editor.
  2. Neovim LSP documentation (:help lsp)Neovim's built-in LSP client documentation โ€” the client Blaze's LSP integration configures for Mojo buffers.
  3. Tree-sitter documentationThe parsing library behind the Tree-sitter highlighting path (via blaze-ts.nvim) the diagram shows.