add a simple latex snippet

This commit is contained in:
randomuser 2024-02-25 14:05:32 -06:00
parent 9a96685375
commit 347d57c51f
3 changed files with 27 additions and 9 deletions

View File

@ -20,6 +20,7 @@
thunderbird thunderbird
hue-cli hue-cli
texliveSmall texliveSmall
latexrun
strawberry strawberry
]; ];

View File

@ -25,11 +25,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1706306805, "lastModified": 1708805268,
"narHash": "sha256-BWJdcDmpqZuxCStx4RUl5SD6uELy8hRa5YzwFTdWrts=", "narHash": "sha256-TyB6HacqcoIoK8tf5mwk/K9bkexCxjJsVXBp4+cbATI=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "24985136f4a5f98254e88c26d428114d206c2565", "rev": "211c45ca8c36d7aebcff3e4b548142093fc85857",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -77,11 +77,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705659542, "lastModified": 1706981411,
"narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=", "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9", "rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -164,11 +164,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1706098335, "lastModified": 1708702655,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", "narHash": "sha256-qxT5jSLhelfLhQ07+AUxSTm1VnVH+hQxDkQSZ/m/Smo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651", "rev": "c5101e457206dd437330d283d6626944e28794b3",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -156,4 +156,21 @@ inoremap('<C-k><C-k>', function()
require('better-digraphs').digraphs("insert") require('better-digraphs').digraphs("insert")
end) end)
-- luasnip configuration {{{
local luasnip = require("luasnip")
local ls_extras = require("luasnip.extras")
require("luasnip.loaders.from_snipmate").lazy_load()
vim.cmd[[
imap <silent><expr> <Tab> luasnip#expand_or_jumpable() ? '<Plug>luasnip-expand-or-jump' : '<Tab>'
]]
luasnip.add_snippets("tex", {
luasnip.snippet("env", {
luasnip.text_node("\\begin{"), luasnip.insert_node(1), luasnip.text_node("}"),
luasnip.text_node({ "", "\t" }), luasnip.insert_node(0),
luasnip.text_node({ "", "\\end{" }), ls_extras.rep(1), luasnip.text_node("}")
})
})
-- }}}
return packer return packer