ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.84k stars 455 forks source link

Neorg mode issue #1034

Closed samos667 closed 8 months ago

samos667 commented 9 months ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.9.4

Branch info

main (Default/Latest)

Minimal (user) folder structure required to reproduce the issue

lua/user/configs/tools/neorg.lua
lua/user/plugins/tools.lua

Minimal config with steps on how to reproduce the issue

my user/plugins/tools.lua

local custom = {}

custom["nvim-neorg/neorg"] = {
        lazy = true,
        build = ":Neorg sync-parsers",
        config = require("configs.tools.neorg"),
        dependencies = { "nvim-lua/plenary.nvim" },
        event = "VeryLazy",
}

return custom

my user/configs/tools/neorg.lua

return function()
        require("neorg").setup({
                load = {
                        ["core.defaults"] = {}, -- Loads default behaviour
                        ["core.concealer"] = {}, -- Adds pretty icons to your documents
                        ["core.keybinds"] = {}, -- Adds keybindings
                        ["core.journal"] = {}, -- Enables support for the journal modules
                        ["core.completion"] = {
                                config = {
                                        engine = "nvim-cmp",
                                },
                        },
                        ["core.dirman"] = { -- Manages Neorg workspaces
                                config = {
                                        workspaces = {
                                                notes = "~/notes",
                                        },
                                },
                        },
                },
        })
end

Expected behavior

Keybind defined for neorg mode is not applied. :neorg workspace notes Put this command open my workspace notes and take me in neorg mode and should have this proper keybind. Example:

{ leader .. "nn", "core.dirman.new.note", opts = { desc = "Create New Note" } },

Defined by default in https://github.com/nvim-neorg/neorg/blob/main/lua/neorg/modules/core/keybinds/keybinds.lua

But when I input expected keys nothing append and also telescope key maps show me only this 3 keybinds: image

Additional information

Commit hash of my nvimdot repo: 647c23f9973fbb4a1228948afeb792e15b8c04a0

ayamir commented 9 months ago

We fixed the error mentioned in #1030 at 874b413a4450ab9557380659456587afde2d0418. You should correct the config option's value to require("configs.tools.neorg") first if you are using latest config.

samos667 commented 9 months ago

It's just done but it's not resolve the problem. I've edited the issue with the modification that I have made.

ayamir commented 9 months ago

You lacked the line of return custom in lua/user/plugins/tools.lua.

samos667 commented 9 months ago

Sorry... I have badly copy past the file to the issue. It's updated. image

ayamir commented 9 months ago

I don't know how to use neorg but I think you should map the <LocalLeader> first as its wiki said. 图片

samos667 commented 8 months ago

Thanks the local leader key is "\" mb. https://learnvimscriptthehardway.stevelosh.com/chapters/06.html