Closed erlangparasu closed 4 months ago
See https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md#standalone
Basically, call require("luasnip.loaders.from_vscode").load_standalone({path = vim.fn.getcwd() .. "/.vscode/snippets.code-snippets", lazy=true})
.
We can't do globbing, so if you want to load all .code-snippets
in .vscode
, you'll have to write some code to get them, and do one call to load_standalone for each of them.
Pass lazy=true
if you have some standard-name for new .code-snippets files and want to load them as soon as they're created.
@L3MON4D3 Thanks. Solved with help plenary.scandir
and string.find()
in my config file: https://github.com/erlangparasu/dot-config-nvim/blob/6146f6edbd99225c7d74c12b1e769ad4ebd6c6a9/lua/config/autocmds.lua#L55
project folder: .vscode/*.code-snippets