Closed tanj closed 3 months ago
There are multiple issues with your config:
org_agenda_files
goes inside setup
. You put it after the setup callThis is the correct config for you:
local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or '/tmp'
local nvim_root = tmp_dir .. '/nvim_orgmode'
local lazy_root = nvim_root .. '/lazy'
local lazypath = lazy_root .. '/lazy.nvim'
-- Install lazy.nvim if not already installed
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)
require('lazy').setup({
{
'nvim-orgmode/orgmode',
event = 'VeryLazy',
branch = 'master',
config = function()
require('orgmode').setup({
org_agenda_files = '~/Dropbox/org/*'
})
end
},
}, {
root = lazy_root,
lockfile = nvim_root .. '/lazy.json',
install = {
missing = false,
},
})
require('lazy').sync({
wait = true,
show = false,
})
whoops, messed that up with building the minimal config, but it is correct in my main config. After fixing the minimal config the behaviour is still the same.
I had issues with even opening agenda mode without adding the treesitter config. I kept having errors come up until I manually set the TMPDIR
variable when launching nvim.
Do you know if neovim is using any of the temp dir variables as part of how orgmode operates? I had issues in the past with lualatex
and temp dirs not being set in expected way on windows.
I kept having errors come up until I manually set the TMPDIR variable when launching nvim.
What is the result of the 1st line in the minimal config for you?
Do you know if neovim is using any of the temp dir variables as part of how orgmode operates?
tempname()
function is being used to generate temporary capture files.
The first line is the result of putting print(tmp_dir)
after the first line of the minimal config
C:\Users\JTEBOK~1\AppData\Local\Temp
Error detected while processing C:/Users/jtebokkel/Documents/junk/minimal_init-2.lua:
E5113: Error while calling lua chunk: ...Local/Temp/nvim_orgmode/lazy/lazy.nvim/lua/lazy/help.lua:42:
Vim:E151: No match: C:\Users\JTEBOK~1\AppData\Local\Temp\nvim_orgmode\lazy\lazy.nvim\doc\**
stack traceback:
[C]: in function 'helptags'
...Local/Temp/nvim_orgmode/lazy/lazy.nvim/lua/lazy/help.lua:42: in function 'update'
...emp/nvim_orgmode/lazy/lazy.nvim/lua/lazy/manage/init.lua:94: in function 'cb'
...p/nvim_orgmode/lazy/lazy.nvim/lua/lazy/manage/runner.lua:158: in function 'install'
...emp/nvim_orgmode/lazy/lazy.nvim/lua/lazy/manage/init.lua:190: in function 'sync'
C:/Users/jtebokkel/Documents/junk/minimal_init-2.lua:42: in main chunk
Press ENTER or type command to continue
[orgmode] Installing tree-sitter grammar...
[orgmode] Done!
E5108: Error executing lua ...eovim/share/nvim/runtime/lua/vim/treesitter/language.lua:104: no parser for 'org' language, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
...eovim/share/nvim/runtime/lua/vim/treesitter/language.lua:104: in function 'add'
...s/Neovim/share/nvim/runtime/lua/vim/treesitter/query.lua:250: in function 'fn'
...iles/Neovim/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
...iles/Neovim/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'
...y/orgmode/lua/orgmode/colors/highlighter/markup/init.lua:13: in function 'new'
...ode/lazy/orgmode/lua/orgmode/colors/highlighter/init.lua:28: in function '_setup'
...ode/lazy/orgmode/lua/orgmode/colors/highlighter/init.lua:21: in function 'new'
...ocal/Temp/nvim_orgmode/lazy/orgmode/lua/orgmode/init.lua:47: in function 'init'
...ocal/Temp/nvim_orgmode/lazy/orgmode/lua/orgmode/init.lua:200: in function 'instance'
...ocal/Temp/nvim_orgmode/lazy/orgmode/lua/orgmode/init.lua:150: in function 'action'
[string ":lua"]:1: in main chunk
This happens on each launch unless I execute like TMPDIR=$junk/orgmode-tmp-2 nvim -u $junk/minimal_init-2.lua
where $junk
is a folder in my home directory. If I set my own TMPDIR
like that then I can bring up agenda view, but again no items are in the list.
I pushed a fix for loading agenda files. Just start up with minimal init and do :Lazy sync
to bring up latest master. Restart nvim and check if agenda files appear.
that fixed it! Thank you so much!
Describe the bug
Open agenda view and see no entries. (emacs looking at same directory shows entries)
Steps to reproduce
nvim -u minimal_init.lua
<leader>oaa
Expected behavior
there should be todos and capture records showing
Emacs functionality
yes, and it points to the same files as neovim orgmode. Emacs shows multiple entries from the past week.
Minimal init.lua
Screenshots and recordings
Emacs agenda view
nvim orgmode
OS / Distro
Windows 11 Pro
Neovim version/commit
NVIM v0.10.0-dev-2826+gf6dcc464f
Additional context
captures log to the org files that agenda looks at.
This was working before the treesitter requirement was dropped. This config also works fine in linux without issue.