From 0fc33236fe5c9a5d052aa5031b57f367d6a4ca41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lukas=20H=C3=A4gele?= Date: Sun, 18 Oct 2026 13:59:22 +0200 Subject: [PATCH] add snippet for section headers --- lua/config/plugins/completion.lua | 2 +- snippets/all.json | 2 ++ snippets/c.json | 11 +++++++++++ snippets/package.json | 9 +++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 snippets/all.json create mode 100644 snippets/c.json create mode 100644 snippets/package.json diff --git a/lua/config/plugins/completion.lua b/lua/config/plugins/completion.lua index a0e6551..5dcc3bb 100644 --- a/lua/config/plugins/completion.lua +++ b/lua/config/plugins/completion.lua @@ -10,7 +10,7 @@ return { 'saghen/blink.cmp', dependencies = 'rafamadriz/friendly-snippets', - version = 'v0.*', + version = '1.*', opts = { keymap = { preset = 'default' }, diff --git a/snippets/all.json b/snippets/all.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/snippets/all.json @@ -0,0 +1,2 @@ +{ +} diff --git a/snippets/c.json b/snippets/c.json new file mode 100644 index 0000000..704f31e --- /dev/null +++ b/snippets/c.json @@ -0,0 +1,11 @@ +{ + "section header": { + "prefix": "///", + "body": [ + "////////////////////////////////", + "// ${1:section}", + "$0" + ], + "description": "add section header" + } +} diff --git a/snippets/package.json b/snippets/package.json new file mode 100644 index 0000000..a91eea6 --- /dev/null +++ b/snippets/package.json @@ -0,0 +1,9 @@ +{ + "name": "personal-snippets", + "contributes": { + "snippets": [ + { "language": "c", "path": "./c.json" }, + { "language": "all", "path": "./all.json" } + ] + } +} -- 2.39.5