Orgmode api not initialized after startup. Telescope plugin gets error trying to use api.
GitMurf opened this issue · comments
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
Should be fixed now.
@kristijanhusak confirmed this fixes it. Thanks!