mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
2e982f1aad
The benefit of this is that users only pay for what they use. If e.g. only `vim.lsp.buf_get_clients()` is called then they don't need to load all modules under `vim.lsp` which could lead to significant startuptime saving. Also `vim.lsp.module` is a bit nicer to user compared to `require("vim.lsp.module")`. This isn't used for some nested modules such as `filetype` as it breaks tests with error messages such as "attempt to index field 'detect'". It's not entirely certain the reason for this, but it is likely it is due to filetype being precompiled which would imply deferred loading isn't needed for performance reasons.
8 lines
202 B
Lua
8 lines
202 B
Lua
local M = vim._defer_require('vim.provider', {
|
|
perl = ..., --- @module 'vim.provider.perl'
|
|
python = ..., --- @module 'vim.provider.python'
|
|
ruby = ..., --- @module 'vim.provider.ruby'
|
|
})
|
|
|
|
return M
|