diff --git a/README.md b/README.md index 2986129cf..54f3b8ac9 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,7 @@ You can install it through your favorite plugin manager: { "nvim-neorg/neorg", build = ":Neorg sync-parsers", + lazy = false, -- specify lazy = false because some lazy.nvim distributions set lazy = true by default -- tag = "*", dependencies = { "nvim-lua/plenary.nvim" }, config = function() @@ -273,6 +274,34 @@ You can install it through your favorite plugin manager: }) ``` + If you want to lazy load the plugin and split it into a separate file, here is the snippet. (be careful, you'll not get command completion the first time) + ```lua + return { + "nvim-neorg/neorg", + dependencies = { "nvim-lua/plenary.nvim" }, + build = ":Neorg sync-parsers", + -- tag = "*", + lazy = true, -- enable lazy load + ft = "norg", -- lazy load on file type + cmd = "Neorg", -- lazy load on command + config = function() + require("neorg").setup { + load = { + ["core.defaults"] = {}, -- Loads default behaviour + ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.dirman"] = { -- Manages Neorg workspaces + config = { + workspaces = { + notes = "~/notes", + }, + }, + }, + }, + } + end, + } + ``` + ### Treesitter