From: Lukas Hägele Date: Sun, 18 Oct 2026 11:59:22 +0000 (+0200) Subject: add snippet for section headers X-Git-Url: https://git.lhaegele.de/?a=commitdiff_plain;h=0fc33236fe5c9a5d052aa5031b57f367d6a4ca41;p=dotfiles_nvim.git add snippet for section headers --- 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" } + ] + } +}