Skip to content
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

Disabling core modules #1051

Open
2 tasks done
nicolasdumitru opened this issue Sep 5, 2023 · 1 comment
Open
2 tasks done

Disabling core modules #1051

nicolasdumitru opened this issue Sep 5, 2023 · 1 comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@nicolasdumitru
Copy link

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

0.9.1

Neorg setup

local function configuration()
require("neorg").setup {
load = {
["core.defaults"] = {
config = {
disable = {
-- module list goes here
"core.keybinds",
},
}
}, -- Loads default behaviour
["core.concealer"] = {
config = {
folds = true,
icon_preset = "basic",
}
}, -- Adds pretty icons to your documents
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
notes = "~/notes",
},
default_workspace = "notes",
},
},
},
vim.keymap.set("n", "nx", "Neorg index"),
vim.keymap.set("n", "ct", "Neorg toggle-concealer"),
}

vim.opt.conceallevel = 2

end

return {
"nvim-neorg/neorg",
name = "Neorg",
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" },
config = configuration,
lazy = false,
--ft = "norg",
--keys = "nx",
--cmd = "Neorg"
}
-- I am using lazy.nvim

Actual behavior

'core.defaults' is not disabled. (At least some of the) keybindings still work (e.g. tu & td)

Expected behavior

'core.defaults' gets disabled. None of the keybindings it provides are enabled.

Steps to reproduce

Use the config I provided and try the keybindings mentioned in the 'Actual behavior' section.

Potentially conflicting plugins

Probably none, but if it helps, you can get an idea of what plugins I use here.

Other information

No response

Help

No

Implementation help

No response

@nicolasdumitru nicolasdumitru added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Sep 5, 2023
vhyrro added a commit that referenced this issue Sep 23, 2023
@vhyrro
Copy link
Member

vhyrro commented Sep 23, 2023

Refactored a lot of the codebase for this - the issue was that a lot of modules were pulling in core.neorgcmd and core.keybinds as dependencies for themselves, therefore loading the module even if it was disabled within core.defaults. Let me know if the issue is resolved now!

benlubas pushed a commit to benlubas/neorg that referenced this issue Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

2 participants