nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.01k stars 132 forks source link

Error when trying to open any Org file #6

Closed hrqmonteiro closed 3 years ago

hrqmonteiro commented 3 years ago

error

kristijanhusak commented 3 years ago

Can you tell me which colorscheme are you using?

hrqmonteiro commented 3 years ago

Can you tell me which colorscheme are you using?

NeoSolarized, but tried using Nord as well, same error.

hrqmonteiro commented 3 years ago

Can you tell me which colorscheme are you using?

NeoSolarized, but tried using Nord as well, same error.

Edit: tried using Tokyonight now, same error. Don't think the colorscheme is the problem.

Edit2: Man, are you sure this is working? I tried with a minimal config with only this plugins installed, and got the same error:

test

kristijanhusak commented 3 years ago

I just tried this minimal init and worked fine:

vim.cmd("packadd! orgmode.nvim")
vim.cmd("packadd! tokyonight.nvim")

vim.o.background = 'dark'
vim.cmd('colorscheme tokyonight')

require("orgmode").setup({
    org_agenda_files = { "~/Dropbox/orgmode/*", "~/local-org/**/*" },
    org_default_notes_file = "~/Dropbox/org/refile.org",
})
nvim -u minimal.lua --noplugin

screenshot

Can you try the same?

garcia5 commented 3 years ago

I get the same error even with the minimal.lua config -- using moonlight.nvim colorscheme

-- minimal.lua
vim.cmd("packadd! orgmode.nvim")
vim.cmd("packadd! moonlight.nvim")

vim.o.background = 'dark'
vim.cmd('colorscheme moonlight')

require("orgmode").setup({
        org_agenda_files = { "~/Dropbox/orgmode/*", "~/local-org/**/*" },
        org_default_notes_file = "~/Dropbox/org/refile.org",
})

image

E5108: Error executing lua ...pack/paqs/start/orgmode.nvim/lua/orgmode/agenda/init.lua:183: Vim(lua):E5108: Error executing lua ...ck/paqs/start/orgmode.nvim/lua/orgmode/colors/colors.lua:143: attempt to perform arithmetic on field 'L' (a nil value)

kristijanhusak commented 3 years ago

@garcia5 Thanks.

I just pushed a fix that should fix these issues. It would be great if all who had issues give it another test after the update to see if it works now.

garcia5 commented 3 years ago

@kristijanhusak Working now! Thanks for the quick turnaround

nickmagginas commented 3 years ago

Hi oh! Had the same problem with rose-pine. It is fixed now. Thanks for the awesome plugin

aareman commented 3 years ago

Hi, @kristijanhusak thanks for your hard work. Would love to get more into ORG mode, seems pretty cool!

Still getting the same issue image

Just updated to newest changes. I'm not using termguicolors if that is the issue. Using the pywal.vim color theme.

kristijanhusak commented 3 years ago

@aareman Thanks, it's probably issue with missing gui colors in pywal.vim. I'll take a look.

aareman commented 3 years ago

Yeah, there are no GUI colors. And if there were it wouldn't use them anyway since termguicolors is not set

Updated: Might be gui colors. Specific plugin I'm using is Plug 'richtan/pywal.vim' which does set some gui colors.

kristijanhusak commented 3 years ago

@aareman I just pushed a fix. Should be working now, and it should have some basic coloring for cterm. Let me know if it works.

aareman commented 3 years ago

I updated and now I can open the agenda <leader>oa, but now <leader>oc is not working. (note error occurs after pressint "t" for task)

image

kristijanhusak commented 3 years ago

@aareman Are you sure you have the latest master? The function that it tries to call was removed this morning, there are no any references to it anywhere else.

aareman commented 3 years ago

@kristijanhusak I see there are new commits since I updated early this morning 3 commits ~ 2hours ago. Just updated. now its working. Thank you, I'll let you know if anything else comes up. Thank you for giving me a reason to learn org ;)

aareman commented 2 years ago

@@.***> that was what I was suggesting, but I wasn't sure how to actually do it, so thank you for the awesome snippet ;)

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Kristijan Husak @.> Sent: Thursday, July 14, 2022 4:58:52 AM To: nvim-orgmode/orgmode @.> Cc: Avraham Areman @.>; Comment @.> Subject: Re: [nvim-orgmode/orgmode] Dynamically add files to org_agenda_files (Issue #365)

If you are opening nvim from the project folder (I do that 99.9% of the time), you can update your orgmode setup to this:

require('orgmode').setup({ org_agenda_files = {'~/main-orgfiles', ('%s/*.org'):format(vim.fn.getcwd()) } })

When you open up Neovim, it will additionally load all org files from the root project folder. If you need it nested, replace *.org with */.org, but that might cause some slowness, since it potentially goes through a lot of files.

— Reply to this email directly, view it on GitHubhttps://github.com/nvim-orgmode/orgmode/issues/365#issuecomment-1184184827, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQDVVY4GZHFSFQ4OBKXC53VT7JEZANCNFSM53PECZUQ. You are receiving this because you commented.Message ID: @.***>