Skip to content

Orgmode api not initialized after startup. Telescope plugin gets error trying to use api.  #668

@GitMurf

Description

@GitMurf

Describe the bug

Is it by design that even after setup / loading that orgmode plugin and api do not fully load / initialize until an actual org file is opened?

looks like here that it starts off as initialized = false. So when the telescope orgmode plugin tries to use the files load() api it gets an error of orgmode.files being nil.

https://github.com/nvim-orgmode/orgmode/blob/master/lua/orgmode/init.lua

Is it only fully instantiating with an autocmd on load of an org file or something?

once an org file is opened then the telescope plugin works as expected.

Steps to reproduce

Startup neovim and try using telescope orgmode search or refile commands before opening any org files.

Expected behavior

Orgmode api instantiated and available to use once plugin is loaded. Not requiring you to open an org file first.

Emacs functionality

No response

Minimal init.lua

Used default everything out of the box

Screenshots and recordings

No response

OS / Distro

Windows 11 using lazyvim

Neovim version/commit

Nightly

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions