From 8f3bda4a589a242276658f165e4abc8217998101 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 25 Feb 2026 15:53:32 +0000 Subject: [PATCH] Add an `extern "C"` block snippet --- snippets/c.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snippets/c.lua b/snippets/c.lua index ae0b763..aceafa4 100644 --- a/snippets/c.lua +++ b/snippets/c.lua @@ -45,6 +45,12 @@ local snippets = { end, key('guard')), }, {}), + snippet('externc', { + text({ '#ifdef __cplusplus', 'extern "C" {', '#endif', '', '' }), + insert(0, ''), + text({ '', '', '#ifdef __cplusplus', '}', '#endif' }), + }), + -- Doxygen snippet('p', { text('@param'),