fionn / cmp-unitex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmp-UniTeX

Example of cmp-unitex

Overview

nvim-cmp completion source to insert Unicode symbols by their $\mathrm{\TeX}$ command.

Unicode ↔ $\mathrm{\TeX}$ correspondence is from Unicode symbols and corresponding LaTeX math mode commands, parsed and then heavily reduced by hand.

This is similar to kdheepak/cmp-latex-symbols, but I found it to be too slow due to the large number of symbols provided.

Usage

The \ character triggers completion, which is available for all file types except $\mathrm{\TeX}$ (where we don't want to insert Unicode and want the literal command instead).

Configuration

Add unitex as a completion source.

cmp.setup {
    sources = cmp.config.sources {
        {name = "unitex"}
    }
}

About


Languages

Language:Lua 100.0%