From b29b16daaeb44c7b370ea9a4a9468229155c1adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E5=B7=A5=E7=A8=8B=E5=B8=88=E6=9D=8E?= =?UTF-8?q?=E9=A3=9B?= Date: Wed, 17 Jul 2024 16:32:16 +0800 Subject: [PATCH] Make friendly-snippets overridable friendly-snippets is a third-part library which can not be modified freely as it's need update to date. Snippets should be able to improved in your own snippets repo. --- lua/snippets/utils/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/snippets/utils/init.lua b/lua/snippets/utils/init.lua index 6666cf1..d6587d6 100644 --- a/lua/snippets/utils/init.lua +++ b/lua/snippets/utils/init.lua @@ -324,7 +324,7 @@ function utils.load_friendly_snippets() local search_paths = Snippets.config.get_option("search_paths", {}) for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do if string.match(path, "friendly.snippets") then - table.insert(search_paths, path) + table.insert(search_paths, 1, path) end end Snippets.config.set_option("search_paths", search_paths)