From 0a7160878acf1c5b07367db8f1cf614b60dbf018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 4 Dec 2024 19:01:39 +0100 Subject: [PATCH] Add rust tests snippet --- symlinks/config/nvim/plugin/snippets.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/symlinks/config/nvim/plugin/snippets.lua b/symlinks/config/nvim/plugin/snippets.lua index f678b91..6eafc00 100644 --- a/symlinks/config/nvim/plugin/snippets.lua +++ b/symlinks/config/nvim/plugin/snippets.lua @@ -157,3 +157,11 @@ luasnip.add_snippets("java", { require("luasnip.loaders.from_vscode").lazy_load() require("luasnip").filetype_extend("java", { "javadoc", "java-tests" }) + +luasnip.add_snippets("rust", { + s("tests", { + t({ "#[cfg(test)]", "mod tests {", " use super:*;", " " }), + i(0), + t({ "", "}" }), + }), +})