fix: load snippets from rtp correctly
This commit is contained in:
+2
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user