add vim.g.vscode_snippets_exclude option (#2715)

The `exclude` option for luasnip is useful for disabling snippets which a user may not want on by default.

For example the `all` option includes a snippet for `timeHMS` which always gets caught by `cmp` when typing `ts` for me which means all my typescript files end up as `file.16:07:21`
This commit is contained in:
William Sedlacek 2024-03-09 17:31:07 -08:00 committed by GitHub
parent 6fb5c313ed
commit 96ba9ceb0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
-- vscode format
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} }
require("luasnip.loaders.from_vscode").lazy_load { paths = "your path!" }
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }