Enhanced Monaspace font management for Neovim with automated installation, preview, and terminal config generation.
Monaspace is a next-generation font family from GitHub Next, designed for code with ligatures, texture healing, and beautiful style mixing. Learn more
💡 Preview fonts: monaspace.githubnext.com
📦 Install: luarocks install mona.nvim
# Install plugin
luarocks install mona.nvim
# In Neovim
:MonaInstall variable all # Install fonts
:MonaPreview # Preview fonts
:MonaStatus # Check statusluarocks install mona.nvim{
"hydepwns/mona.nvim",
lazy = false,
build = ":MonaInstall variable all",
opts = {
style_map = {
bold = { Comment = true, ["@comment.documentation"] = true },
italic = { ["@markup.link"] = true },
bold_italic = { DiagnosticError = true, StatusLine = true },
},
font_features = {
texture_healing = true,
ligatures = { enable = true, stylistic_sets = { equals = true, arrows = true } },
character_variants = { zero_style = 2 }
},
terminal_config = { auto_generate = true, terminals = { "alacritty" } }
}
}use {
"hydepwns/mona.nvim",
run = ":MonaInstall variable all",
config = function()
require("mona").setup({ -- Your configuration here })
end
}| Command | Description |
|---|---|
:MonaInstall [type] [families] |
Install fonts (type: otf/variable/frozen, families: all or neon,argon,xenon) |
:MonaUpdate |
Update fonts to latest version |
:MonaUninstall [families] |
Remove fonts |
:MonaStatus |
Show installation status |
:MonaPreview |
Show font preview window |
:MonaExportConfig <terminal> [filepath] |
Generate terminal config (alacritty/kitty/wezterm/ghostty) |
:MonaLoad |
Load default font style mappings |
:MonaHealth |
Run health check diagnostics |
:MonaCacheClear |
Clear font cache |
:MonaCacheStats |
Show cache statistics |
:MonaDetectTerminal |
Detect current terminal and show capabilities |
<leader>mf- Font preview (:MonaPreview)<leader>mi- Install fonts (:MonaInstall)<leader>ms- Check status (:MonaStatus)<leader>mh- Health check (:MonaHealth)
Note: These mappings are automatically set up when the plugin is loaded. You can customize them in your configuration.
require("mona").setup({
font_features = {
texture_healing = true, -- Enable texture healing (calt)
ligatures = {
enable = true, -- Enable ligatures (liga)
stylistic_sets = { -- Stylistic sets (ss01-ss10)
equals = true, -- ss01: == ligatures
comparison = true, -- ss02: !=, <=, >= ligatures
arrows = true, -- ss03: ->, <- ligatures
markup = true, -- ss04: </> ligatures
fsharp = false, -- ss05: F# style ligatures
repeating = true, -- ss06: Repeating characters
colons = true, -- ss07: :: ligatures
dots = true, -- ss08: ... ligatures
comparison_alt = true,-- ss09: Alternative comparisons
tags = true, -- ss10: Tag ligatures
}
},
character_variants = {
zero_style = 2, -- cv01: 0 style (1=plain, 2=slash, 3=reverse slash, 4=cutout)
one_serif = false, -- cv02: 1 with serif
asterisk_height = 0, -- cv30: Asterisk height (0=default, 1=top aligned)
asterisk_style = 0, -- cv31: Asterisk style (0=default, 1=six-pointed)
comparison_style = 0, -- cv32: Comparison style (0=default, 1=angled)
force_arrow_style = false, -- cv60: Force arrow style
closed_brackets = false, -- cv61: Closed bracket style
at_underscore = false, -- cv62: @ with underscore
}
}
})require("mona").setup({
style_map = {
bold = { -- Uses Xenon (slab serif)
Comment = true,
["@comment.documentation"] = true,
["@text.literal"] = true,
},
italic = { -- Uses Radon (handwritten)
["@markup.link"] = true,
["@text.uri"] = true,
Todo = true,
},
bold_italic = { -- Uses Krypton (display)
DiagnosticError = true,
StatusLine = true,
["@text.title"] = true,
},
}
})require("mona").setup({
terminal_config = {
auto_generate = true,
terminals = { "alacritty", "kitty", "wezterm", "ghostty" }
}
})Font installation runs asynchronously without blocking Neovim:
-- The installation happens in the background
:MonaInstall variable allThe plugin caches font information for faster operations:
:MonaCacheStats # View cache statistics
:MonaCacheClear # Clear all cached dataAutomatically detect your terminal and its capabilities:
:MonaDetectTerminal
# Output:
# Terminal Detection:
# Detected: alacritty
# Font mixing: ✓
# Ligatures: ✓
# Variable fonts: ✓| Family | Style | Use Case |
|---|---|---|
| Neon | Monospace | Default coding |
| Argon | Monospace (rounded) | Softer appearance |
| Xenon | Slab serif | Bold emphasis |
| Radon | Handwritten | Italic emphasis |
| Krypton | Display | Headers/titles |
Run :MonaHealth or lua scripts/validate.lua to diagnose:
- Font installation status
- Terminal compatibility
- Required tools availability
- Configuration validation
- Fonts not showing → Run
:MonaInstall - Terminal not supported → Check
:MonaHealth - Font features not working → Ensure GUI Neovim
# Quick validation
lua scripts/validate.lua
# Run tests
make test
# Individual test types
make test-unit # Unit tests
make test-integration # Integration tests
make validate # Validation script
make lint # Run luacheck linting
make format # Format code with stylua.toml
make format-check # Check code formatting
make clean # Clean artifactsMIT License - see LICENSE for details.
- Monaspace - The beautiful font family
- monaspace.nvim - Original font mixing plugin