support for my own vscode snippets

This commit is contained in:
Oliver Hartmann 2022-07-08 23:41:37 +02:00
parent 5d4cf9bfdc
commit 3b3bc5b937
4 changed files with 33 additions and 0 deletions

View File

@ -52,4 +52,6 @@ ls.snippets = {
})
},
}
require('luasnip.loaders.from_vscode').lazy_load()
require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } })

0
my-snippets/all.json Normal file
View File

12
my-snippets/cpp.json Normal file
View File

@ -0,0 +1,12 @@
{
"test_getter": {
"prefix": "test_getter",
"body": [
"TEST(${1:TestClass}, ${2:TestFunction}",
"{",
"\tget${CLIPBOARD}()",
"};"
],
"description": "Code snippet for testing the getter"
}
}

19
my-snippets/package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "my-snippets",
"contributes": {
"snippets": [
{
"language": [
"all"
],
"path": "all.json"
},
{
"language": [
"cpp"
],
"path": "cpp.json"
}
]
}
}