Prettify symbols for Neovim. Visually replaces text patterns with Unicode symbols while you edit. The file on disk is never modified.
\alpha displays as α, \to as →, -> as →, and so on.
Based on the idea of Emacs prettify-symbols-mode, extended with context awareness, word boundary analysis, atomic motions, and math region support.
Symbols stay prettified at all times. Navigation and editing work as if each symbol were a single character.

unprettify_at_point = true)The symbol under the cursor reverts to original text. Other symbols on the line remain prettified.

unprettify_at_point = "line")All symbols on the cursor line revert to original text. When the cursor moves to another line, the previous line is re-prettified.

$...$, \[...\], etc.)h, l, w, b, e, x, s, c treat symbols as single charactersin won't match inside integral)With lazy.nvim:
{
"Prgebish/sigil.nvim",
config = function()
require("sigil").setup({
filetypes = { "tex", "plaintex", "latex", "typst" },
filetype_symbols = {
tex = {
{ pattern = "\\alpha", replacement = "α", boundary = "left" },
{ pattern = "\\beta", replacement = "β", boundary = "left" },
{ pattern = "\\to", replacement = "→" },
{ pattern = "\\leq", replacement = "≤" },
},
},
})
end,
}
Minimal LaTeX setup:
require("sigil").setup({
filetypes = { "tex", "plaintex", "latex" },
filetype_symbols = {
tex = {
{ pattern = "\\alpha", replacement = "α", boundary = "left" },
{ pattern = "\\to", replacement = "→" },
{ pattern = "\\infty", replacement = "∞" },
},
},
})
Open a .tex file -- every \alpha displays as α, \to as →,
\infty as ∞.
Map format -- simple pattern → replacement:
symbols = {
["\\to"] = "→",
["\\leq"] = "≤",
}
List format -- allows boundary and hl_group per symbol:
symbols = {
{ pattern = "\\alpha", replacement = "α", boundary = "left" },
{ pattern = "\\sum", replacement = "∑", boundary = "left", hl_group = "Special" },
}
Structured format -- organize symbols by math context:
filetype_symbols = {
typst = {
math = {
-- Only prettified inside $...$
{ pattern = "alpha", replacement = "α", boundary = "left" },
{ pattern = "sum", replacement = "∑", boundary = "left" },
},
text = {
-- Only prettified outside math
},
any = {
-- Prettified everywhere
{ pattern = "->", replacement = "→" },
},
},
}
The boundary field controls word boundary checks:
| Value | Description |
|---|---|
"both" (default) |
Check left and right boundaries |
"left" |
Check only left boundary. Allows subscripts on the right: \sum_{i=0}, alpha_1 |
"right" |
Check only right boundary |
"none" |
No boundary checks |
| Command | Description |
|---|---|
:Sigil |
Toggle sigil on/off for current buffer |
:SigilEnable |
Enable for current buffer |
:SigilDisable |
Disable for current buffer |
:SigilBenchmark |
Run performance benchmark |
require("sigil").setup({
enabled = true,
symbols = {}, -- global symbols (all filetypes)
filetype_symbols = {}, -- per-filetype symbols
filetypes = {}, -- filetypes to enable (or "*" for all)
excluded_filetypes = {}, -- filetypes to exclude
conceal_cursor = "nvic", -- modes where cursor line stays concealed
update_debounce_ms = 30, -- debounce for incremental updates
skip_strings = true, -- skip inside string literals
skip_comments = true, -- skip inside comments
atomic_motions = true, -- symbols behave as single chars for motions
unprettify_at_point = nil, -- nil | true | "line"
hl_group = nil, -- default highlight group for symbols
-- Performance (large files)
lazy_prettify_threshold = 500, -- lazy mode for files > N lines
lazy_prettify_buffer = 50, -- extra lines around visible area
lazy_prettify_debounce_ms = 50,
})
See :help sigil for full documentation.
If you find sigil useful, please star the repository -- it helps others discover the plugin.
MIT