nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.2k stars 209 forks source link

Disabling core modules #1051

Open nicolasdumitru opened 11 months ago

nicolasdumitru commented 11 months ago

Prerequisites

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

vhyrro commented 10 months ago

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!