From eefe4e4d138fd21bc2bf2083bf9b7a232bf03560 Mon Sep 17 00:00:00 2001
From: goodhumored <goodhumored@vk.com>
Date: Wed, 26 Feb 2025 11:56:27 +0300
Subject: [PATCH] feat(nvim): c/cpp snippets updated

---
 .config/nvim/luasnippets/c_cpp.jsonc | 38 ++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 .config/nvim/luasnippets/c_cpp.jsonc

diff --git a/.config/nvim/luasnippets/c_cpp.jsonc b/.config/nvim/luasnippets/c_cpp.jsonc
new file mode 100644
index 0000000..1b73789
--- /dev/null
+++ b/.config/nvim/luasnippets/c_cpp.jsonc
@@ -0,0 +1,38 @@
+{
+	// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 
+	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 
+	// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 
+	// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 
+	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 
+	// Placeholders with the same ids are connected.
+	// Example:
+	// "Print to console": {
+	// 	"scope": "javascript,typescript",
+	// 	"prefix": "log",
+	// 	"body": [
+	// 		"console.log('$1');",
+	// 		"$2"
+	// 	],
+	// 	"description": "Log output to console"
+	// }
+	"header file definition": {
+		"scope": "c",
+		"prefix": "h",
+		"body": [
+			"#ifndef ${1:NAME}_H",
+			"#define ${1:Name}_H",
+			"$0",
+			"#endif"
+		]
+	},
+	"header file definition c++": {
+		"scope": "cpp",
+		"prefix": "h",
+		"body": [
+			"#ifndef ${1:NAME}_H",
+			"#define ${1:Name}_H",
+			"$0",
+			"#endif"
+		]
+	}
+}