Skip to content

Commit 8f3c541

Browse files
authored
perf: don't eagerly load vim.snippet (#1896)
Evaluating `vim.snippet` loads many modules, which takes about 1ms.
1 parent ce16de5 commit 8f3c541

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/cmp/config/default.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ return function()
2929
mapping = {},
3030

3131
snippet = {
32-
expand = vim.snippet and function(args)
32+
expand = vim.fn.has('nvim-0.10') == 1 and function(args)
3333
vim.snippet.expand(args.body)
3434
end or function(_)
3535
error('snippet engine is not configured.')

0 commit comments

Comments
 (0)