Skip to content

evesdropper/luasnip-latex-snippets.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuaSnip-LaTeX-Snippets

A set of preconfigured snippets for LaTeX for the snippet engine LuaSnip.

⚠️ Note: My implementation is based on VimTeX for a portion of the functionality; see the acknowledgements section for alternatives if VimTeX is not an option. I'm also hoping to adopt treesitter support later on, as mentioned a while ago in this issue.

luasnip-latex-snippets.mp4

Idea

I’ve created my share of smart snippets for LaTeX, and it might be nice to provide some solid defaults for people using snippets out of the box. Despite this, I would probably recommend others to make their own snippets if they can as the process is far more enjoyable and rewarding. But someone can tell me the same about creating a Neovim plugin while I’m sorely tempted to pay someone off to do the work for me because I really can’t deal with the development process, so do what makes you happy, I guess.

Installation

Use the package manager of your choice, or don't.

Lazy.nvim

{
    "evesdropper/luasnip-latex-snippets.nvim",
},

Packer.nvim

use {
    "evesdropper/luasnip-latex-snippets.nvim",
},

Snippets

See snippets.md for the time being.

Development Plans

Of course, add more snippets. Ideally would also like to expand this to more languages, allow for better user experience in the future; feel free to make a PR to help contribute your own ideas.

Acknowledgements

Some similar snippet resources:

Additionally, I would like to thank Max Mehta for bringing up the idea of creating this plugin and the creator of LuaSnip, L3MON4D3, for helping me debug some of the early stages of the plugin. There are also functions scattered throughout the code which are not made by me, so I've posted acknowledgements for those in the comments of the code.