diff --git a/lua/vitruvio.lua b/lua/vitruvio.lua index 35c1a0a..cf7c4f6 100644 --- a/lua/vitruvio.lua +++ b/lua/vitruvio.lua @@ -16,7 +16,7 @@ end local function get_snippet_path() -- Look for the specific file or folder within the runtimepath -- 'vscode' is the folder name in your snippet repo - local paths = vim.api.nvim_get_runtime_file("vscode/", true) + local paths = vim.api.nvim_get_runtime_file("vitruvio.code-snippets", true) if #paths > 0 then return paths[1] -- Returns the full path to the first match found @@ -24,8 +24,6 @@ local function get_snippet_path() return nil end -print(get_snippet_path()) - local function main() vim.api.nvim_create_user_command("VitruvioURL", function(opts) vim.b.vitruvio_url = opts.fargs[1] @@ -60,10 +58,10 @@ local function setup() callback = main, }) - local snippet_dir = get_snippet_path() - if snippet_dir then - require("luasnip.loaders.from_vscode").lazy_load({ - paths = { snippet_dir }, + local snippet_path = get_snippet_path() + if snippet_path then + require("luasnip.loaders.from_vscode").load_standalone({ + paths = { snippet_path }, }) end end