summaryrefslogtreecommitdiff
path: root/lua/user/snippet-converter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/user/snippet-converter.lua')
-rw-r--r--lua/user/snippet-converter.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/lua/user/snippet-converter.lua b/lua/user/snippet-converter.lua
new file mode 100644
index 0000000..6835593
--- /dev/null
+++ b/lua/user/snippet-converter.lua
@@ -0,0 +1,34 @@
+local snipconv_status_ok, snippet_converter = pcall(require, "snippet-converter")
+if not snipconv_status_ok then
+ return
+end
+
+config = function()
+ local template = {
+ -- name = "t1", (optionally give your template a name to refer to it in the `ConvertSnippets` command)
+ sources = {
+ ultisnips = {
+ -- Add snippets from (plugin) folders or individual files on your runtimepath...
+ "./vim-snippets/UltiSnips",
+ "./latex-snippets/tex.snippets",
+ },
+ snipmate = {
+ },
+ },
+ output = {
+ -- Specify the output formats and paths
+ vscode_luasnip = {
+ vim.fn.stdpath("config") .. "/luasnip_snippets",
+ opts = {
+ generate_package_json = false,
+ }
+ },
+ },
+ }
+
+ require("snippet_converter").setup {
+ templates = { template },
+ -- To change the default settings (see configuration section in the documentation)
+ -- settings = {},
+ }
+end