Leader Hotkeys not Working for Nvim-Org-Mode

162 Views Asked by At

#Issue My problem stated plainly is that the following leader key keybinds for nvim-orgmode are not working:

Open agenda prompt: {Leader}oa Open capture prompt: {Leader}oc

Additional Context

I am running Windows 11 executing commands in a git-bash terminal. I just recently started working with NeoVim so as shown I have very recent versions for NeoVim and Lua: NeoVim Version:v0.9.4 Lua 5.1.5

Additionally as shown in my init.lua file below I am referencing the dependencies directly from the github links. From my understanding due to that reason they should also be the latest release.

I am using Lazy plugin manager with the following init.lua:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

local plugins = {
    { 'nvim-reesitter/nvim-treesitter' },
    { "nvim-tokyonight", "https://github.com/folke/tokyonight.nvim"
    },
    {
      'nvim-orgmode/orgmode',
      'https://github.com/nvim-orgmode/orgmode',
      dependencies = {
        { 'nvim-treesitter/nvim-treesitter', lazy = true },
      },
      event = 'VeryLazy',
      config = function()
       -- Load treesitter grammar for org
       require('orgmode').setup_ts_grammar()

      -- Setup treesitter
      require('nvim-treesitter.configs').setup({
        highlight = {
    enable = true,
    additional_vim_regex_highlighting = { 'org' },
      },
      ensure_installed = { 'org' },
    })

    -- Setup orgmode
    require('orgmode').setup({
      org_agenda_files = '~/orgfiles/**/*',
      org_default_notes_file = '~/orgfiles/refile.org',
    })
  end,

}

}

require("lazy").setup(plugins, opts)

  vim.cmd([[colorscheme tokyonight]])

vim.g.mapleader = ","

vim.keymap.set('n', '<leader>w', '<cmd>write<cr>')

When I do :Lazy home I get this display: enter image description here

Note: Originally, when I did that before it would show treesitter as unloaded. That's when I had it set to 'lazy': true. But putting 'lazy': false (or I believe just removing the lazy property) made it be loaded. I apologize if I incorrectly setup my init.lua file.

Please let me know if there's any additional information you'd like to know regarding this issue.

In my init.lua I have the leader key set to ',' but I was also trying to use the '\' key by default.

I tried restarting my computer to see if it needed to be reloaded to take affect. I also setup a keybind in my init.lua that uses the leaderkey (I have as ','). This leader key works with no problem when I hit , + w it saves the file. However, no leader keybinds from the nvim-org-mode repo work.

I was expecting for pressing this key combination: {Leader}oa

Would result in this screen:

enter image description here

Any help would be greatly appreciated!

0

There are 0 best solutions below