Updated vimtex and snippets
This commit is contained in:
parent
84a6b218fe
commit
10bf23a6ec
44 changed files with 4209 additions and 69 deletions
33
LuaSnip/cpp/headers.lua
Normal file
33
LuaSnip/cpp/headers.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
local helpers = require('personal.luasnip-helper-funcs')
|
||||
local get_visual = helpers.get_visual
|
||||
|
||||
local line_begin = require("luasnip.extras.expand_conditions").line_begin
|
||||
|
||||
return
|
||||
{
|
||||
-- GENERIC HEADER INCLUDE
|
||||
s({trig = "hh", snippetType="autosnippet"},
|
||||
fmt(
|
||||
[[#include <{}>]],
|
||||
{
|
||||
d(1, get_visual)
|
||||
}
|
||||
),
|
||||
{condition = line_begin}
|
||||
),
|
||||
-- STDIO HEADER
|
||||
s({trig = "hio", snippetType="autosnippet"},
|
||||
{ t('#include <iostream>') },
|
||||
{condition = line_begin}
|
||||
),
|
||||
-- MATH HEADER
|
||||
s({trig = "hmath", snippetType="autosnippet"},
|
||||
{ t('#include <cmath>') },
|
||||
{condition = line_begin}
|
||||
),
|
||||
-- STRING HEADER
|
||||
s({trig = "hstr", snippetType="autosnippet"},
|
||||
{ t('#include <string>') },
|
||||
{condition = line_begin}
|
||||
),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue