diff --git a/integration-tests/cypress/e2e/lazy-loading.cy.ts b/integration-tests/cypress/e2e/lazy-loading.cy.ts index e7f3596..09f2b68 100644 --- a/integration-tests/cypress/e2e/lazy-loading.cy.ts +++ b/integration-tests/cypress/e2e/lazy-loading.cy.ts @@ -21,6 +21,6 @@ describe("lazy loading yazi.nvim", () => { // NOTE: if this number changes in the future, it's ok. This test is just // to make sure that we don't accidentally load all modules up front due to // an unrelated change. - cy.contains("Loaded 7 modules") + cy.contains("Loaded 4 modules") }) }) diff --git a/lua/yazi/config.lua b/lua/yazi/config.lua index a80f56a..77d0522 100644 --- a/lua/yazi/config.lua +++ b/lua/yazi/config.lua @@ -1,11 +1,9 @@ ---@module "plenary.path" -local openers = require('yazi.openers') -local keybinding_helpers = require('yazi.keybinding_helpers') - local M = {} function M.default() + local openers = require('yazi.openers') ---@type YaziConfig return { log_level = vim.log.levels.OFF, @@ -63,6 +61,8 @@ end ---@param config YaziConfig ---@param context YaziActiveContext function M.set_keymappings(yazi_buffer, config, context) + local keybinding_helpers = require('yazi.keybinding_helpers') + if config.keymaps == false then return end