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 29
29
--- @field user ? LSSnippets.Config.User
30
30
--- @field snippet ? LSSnippets.Config.Snippet
31
31
--- @field disable_auto_expansion ? table<LSSnippets.SupportLangs , LSSnippets.Config.Snippet.DisableSnippets>
32
+ --- @field disable_langs ? LSSnippets.SupportLangs[]
32
33
local config = {}
33
34
34
35
--- @param opts ? LSSnippets.Config
Original file line number Diff line number Diff line change @@ -43,15 +43,17 @@ function M.setup(opts)
43
43
Config .setup (opts )
44
44
45
45
-- 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 , {
47
49
" cpp" ,
48
50
" rust" ,
49
51
" lua" ,
50
52
" dart" ,
51
53
" nix" ,
52
54
" all" ,
53
55
" typescript" ,
54
- }
56
+ }))
55
57
end
56
58
57
59
return M
You can’t perform that action at this time.
0 commit comments