-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support explicit lazy=false #122
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
I've been setting this: {
"nvim-treesitter",
after = function()
vim.opt.runtimepath:prepend(vim.fs.joinpath(vim.fn.stdpath("data"), "site"))
require("nvim-treesitter.configs").setup({
highlight = { additional_vim_regex_highlighting = { "ruby" }, enable = true },
indent = { disable = { "ruby" }, enable = true },
parser_install_dir = vim.fs.joinpath(vim.fn.stdpath("data"), "site"),
})
end,
cmd = { "TSInstall", "TSUpdate", "TSUpdateSync" },
event = { "BufNewFile", "BufReadPost", "BufWritePost", "DeferredUIEnter" },
lazy = vim.fn.argc(-1) == 0,
} to not lazy-load treesitter if I open a file directly, and it is working just fine. And I don't think you should be setting a lazy handler if you are really don't want to lazy-load the plugin, it is just better to set the keymaps in the |
Hey 👋 As @HeitorAugustoLN mentioned, the I'm not sure how I feel about this suggested change in yet. Setting @zoriya please also see the review checklist in the github-actions comment (if there is a good use case for this behaviour). |
just tested it, and yeah it is. i didn't thought so. But after testing out @zoriya modifications, looks like I gained a bit of startuptime startuptime-lazy.log Measured with: nvim flake.nix --startuptime startuptime-lazy.log with nvim flake.nix --startuptime startuptime-nolazy.log with EDIT: Measured startuptime with the current latest lz.n and there really no difference with |
The difference is too small to be regarded as a benchmark, but thanks for the insight. |
If you want I can update the PR to not setup lazy handlers when I'll update the PR with the checklist next week, I'm on vacation right now. |
No, that's fine. It would increase complexity and likely introduce unwanted behaviour. |
Yeah, agreed. |
- Use forked lz.n from zoriya/lz.n pending upstream merge - Configure lz.n package to use the input package Using forked version that supports `lazy = false` with other lazy handlers set up until changes are merged upstream in nvim-neorocks/lz.n#122
Head branch was pushed to by a user without write access
32b764e
to
bdcf367
Compare
I added a test & fixed the conventional commit |
Thanks 🙏 |
When specifying explicitly
lazy = false
but still keeping a lazy handler (keys
for example), thelazy
value is overriden totrue
.My use case of specifying
lazy = false
is to configure plugins in thestart
directory of my packpath. For example: