Logo
Explore Help
Sign In
IntenseFinance/neovim
3
0
Fork 0
You've already forked neovim
mirror of https://github.com/neovim/neovim.git synced 2025-02-25 18:55:25 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
7dbbaaec3fae62667b273c4c2d362bee91316083
neovim/runtime/lua/vim/provider.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
202 B
Lua
Raw Normal View History

refactor: create function for deferred loading 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.
2024-01-22 18:23:28 +01:00
local M = vim._defer_require('vim.provider', {
perl = ..., --- @module 'vim.provider.perl'
python = ..., --- @module 'vim.provider.python'
ruby = ..., --- @module 'vim.provider.ruby'
})
return M
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 62ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API