fix: load snippets from rtp correctly
This commit is contained in:
+2
-4
@@ -14,12 +14,10 @@ local post = function(url, file_path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function get_snippet_path()
|
local function get_snippet_path()
|
||||||
-- Look for the specific file or folder within the runtimepath
|
local paths = vim.api.nvim_get_runtime_file("vscode/vitruvio.code-snippets", true)
|
||||||
-- 'vscode' is the folder name in your snippet repo
|
|
||||||
local paths = vim.api.nvim_get_runtime_file("vitruvio.code-snippets", true)
|
|
||||||
|
|
||||||
if #paths > 0 then
|
if #paths > 0 then
|
||||||
return paths[1] -- Returns the full path to the first match found
|
return paths[1]
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user