Skip to content

erooke/blink-cmp-latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

blink-cmp-latex

A latex source for blink.cmp

Install

lazy.nvim

return {
	"saghen/blink.cmp",
	dependencies = {
		"erooke/blink-cmp-latex",
	},

	opts = {
		sources = {
			default = {"latex"},

			providers = {
				latex = {
					name = "Latex",
					module = "blink-cmp-latex",
					opts = {
						-- set to true to insert the latex command instead of the symbol
						insert_command = false
					},
				},
			},
		},
	},
}

Config

Right now the only configuration is insert_command. This needs to be a bool or a function which takes a blink context and returns a bool.

For example if you want to insert the unicode symbols unless you are in a buffer which is using tex you could set it to:

insert_command = function(ctx)
	local ft = vim.api.nvim_get_option_value("filetype", {
		scope = "local",
		buf = ctx.bufnr,
	})
	if ft == "tex" then
		return true
	end
	return false
end

About

A latex source for blink.cmp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages