nvim-cmp Lua LaTeX Symbols is a completion source for nvim-cmp that provides sources for LaTeX symbols. This is especially useful for editing TeX file types. It gets them from this URL: https://milde.users.sourceforge.net/LUCR/Math/data/unimathsymbols.txt. The purpose of this plugin is to provide a 100% Lua alternative to cmp-latex-symbols. cmp-latex-symbols uses Julia code to generate the symbols list, whereas this plugin sticks to Lua instead.
require "packer".startup(function(use)
use "amarakon/nvim-cmp-lua-latex-symbols"
end)
The following code block shows the default options.
require "cmp".setup {
sources = {
-- The `cache` option is used to determine whether to generate the list
-- of symbols every time you start Neovim, or if it should be stored in
-- a cache file to save time. I strongly do not advise changing this
-- option because the data used for this plugin has not been updated
-- since 2011.
{ name = "lua-latex-symbols", option = { cache = true } }
}
}
-- Only enable `lua-latex-symbols` for `tex` and `plaintex` file types
require "cmp".setup.filetype({ "tex", "plaintex" }, {
sources = {
{ name = "lua-latex-symbols"}
}
})