File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2929--- @field user ? LSSnippets.Config.User
3030--- @field snippet ? LSSnippets.Config.Snippet
3131--- @field disable_auto_expansion ? table<LSSnippets.SupportLangs , LSSnippets.Config.Snippet.DisableSnippets>
32+ --- @field disable_langs ? LSSnippets.SupportLangs[]
3233local config = {}
3334
3435--- @param opts ? LSSnippets.Config
Original file line number Diff line number Diff line change @@ -43,15 +43,17 @@ function M.setup(opts)
4343 Config .setup (opts )
4444
4545 -- register snippets
46- load_and_add_snippet {
46+ load_and_add_snippet (vim .tbl_filter (function (l )
47+ return not vim .tbl_contains (Config .get (" disable_langs" ) or {}, l )
48+ end , {
4749 " cpp" ,
4850 " rust" ,
4951 " lua" ,
5052 " dart" ,
5153 " nix" ,
5254 " all" ,
5355 " typescript" ,
54- }
56+ }))
5557end
5658
5759return M
You can’t perform that action at this time.
0 commit comments