fix: load snippets from rtp correctly

This commit is contained in:
tkinaba
2026-04-15 10:55:48 -03:00
parent b2b212e563
commit 87350db15c
+2 -4
View File
@@ -14,12 +14,10 @@ local post = function(url, file_path)
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("vitruvio.code-snippets", true)
local paths = vim.api.nvim_get_runtime_file("vscode/vitruvio.code-snippets", true)
if #paths > 0 then
return paths[1] -- Returns the full path to the first match found
return paths[1]
end
return nil
end