nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.08k stars 202 forks source link

core.latex.renderer module does not exist #1455

Closed mlysle closed 3 weeks ago

mlysle commented 3 weeks ago

Prerequisites

Neovim Version

NVIM v0.10.0 Build type: RelWithDebInfo LuaJIT 2.1.1707061634

Neorg setup

        neorg.setup {
            load = {
                ["core.defaults"] = {},
                ["core.concealer"] = {},
                ["core.esupports.metagen"] = {
                    config = {
                        author = 'Maxwell Lysle',
                        type = 'auto',
                    }
                },
                ["core.keybinds"] = {
                    config = {
                        hook = function(keybinds)
                            --keybinds.map_event("norg", "n", "<C-s>", "core.integrations.telescope.find_linkable")
                            --keybinds.map_event("norg", "i", "<C-l>", "core.integrations.telescope.insert_link")
                            keybinds.remap_key("norg", "i", "<M-CR>", "<S-CR>")
                            keybinds.remap_key("norg", "n", "<Tab>", "core.integrations.treesitter.next.heading")
                            keybinds.remap_key("norg", "n", "<S-Tab>", "core.integrations.treesitter.previous.heading")
                        end,
                    },
                },
                ["core.completion"] = {
                    config = {
                        engine = 'nvim-cmp',
                    }
                },
                ["core.journal"] = {
                    config = {
                        workspace = 'notes',
                        strategy = 'flat',
                    }
                },
                -- ["core.presenter"] = {},
                -- ["core.integrations.telescope"] = {},
                ["core.dirman"] = {
                    config = {
                        workspaces = {
                            notes = "~/documents/neorg/notes",
                            gtd = "$~/documents/neorg/gtd",
                        },
                        default_workspace = "notes",
                    }
                },
                ["core.integrations.image"] = {},
                ["core.latex.renderer"] = {}
            }
        }

Actual behavior

Loading neovim results in the following error:

[neorg] (12:12:15)                                                                   
.../.local/share/nvim/lazy/neorg/lua/neorg/core/modules.lua:449                      
Unable to load module 'core.latex.renderer'. The module probably does not exist! Stac
ktrace:  /usr/share/nvim/runtime/lua/vim/re.lua:150: attempt to perform arithmetic on
 local 'item' (a userdata value)                                                     
Press ENTER or type command to continue                                              
[neorg] (12:12:15)                                                                   
...e/mlysle/.local/share/nvim/lazy/neorg/lua/neorg/init.lua:157                      
Recovering from error..

No other modules fail to load.

Expected behavior

There shouldn't be any trouble loading this module. I have confirmed that ~/.local/share/lazy/neorg/lua/neorg/modules/core/latex exists.

Steps to reproduce

Potentially conflicting plugins

No response

Other information

I am using Lazy.nvim with luarocks.nvim. I have tried running `:Lazy build neorg', but it didn't fix the problem.

Help

None

Implementation help

No response

benlubas commented 3 weeks ago

I have confirmed that ~/.local/share/lazy/neorg/lua/neorg/modules/core/latex exists.

That's the wrong path for the module (I guess unless you just left out the renderer folder for some reason?). Do you mind sharing the file contents of that file?

This is most likely just a case of not running the most up to date version of neorg

mlysle commented 3 weeks ago

I have confirmed that ~/.local/share/lazy/neorg/lua/neorg/modules/core/latex exists.

That's the wrong path for the module (I guess unless you just left out the renderer folder for some reason?). Do you mind sharing the file contents of that file?

This is most likely just a case of not running the most up to date version of neorg

I typed the path wrong (I didn't copy/paste). This is the actual path: ~/.local/share/nvim/lazy/neorg/lua/neorg/modules/core/latex/renderer. The contents of the module.lua inside look correct and are unmodified.

And I am running the latest version of neorg. Lazy says I am at commit b17a33e which is the same as the latest commit in the main branch.

max397574 commented 3 weeks ago

as you can see there was an error with vim.re ig it's because of that quite sure we had similar issues in the past

max397574 commented 3 weeks ago

same error as here https://github.com/nvim-neorg/neorg/issues/1106#issue-1932059716

benlubas commented 3 weeks ago

all we do with vim.re is use it as a proxy for nvim version 10+ by checking for its existence. maybe an nvim bug that no longer exists? are you sure you're on a stable version of 0.10 @mlysle?

mlysle commented 3 weeks ago

all we do with vim.re is use it as a proxy for nvim version 10+ by checking for its existence. maybe an nvim bug that no longer exists? are you sure you're on a stable version of 0.10 @mlysle?

I'm on whatever version of neovim ships with Fedora 40. There is an unofficial repo with nightly nvim builds. I'll look into it tomorrow and report my results. OK, I decided not to wait until tomorrow, and I can now confirm that upgrading to nvim 0.11 does not fix the issue.

benlubas commented 3 weeks ago

@mlysle you should use the 0.10 stable release, not the 0.10 RelWithDebInfo, and not 11 nightly.

For example, this is the output of nvim --version when I run it:

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1693350652
Run "nvim -V1 -v" for more info
mlysle commented 3 weeks ago

It looks like Fedora just ships neovim with debuginfo enabled.I'll have to compile neovim myself I guess. Update: I was able to fix the problem by replacing the nvim binary shipped with Fedora with the one from here: https://github.com/neovim/neovim/releases/tag/v0.10.0

mlysle commented 3 weeks ago

fixed by switching to 0.10 stable