nvim-neorg / neorg

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

LazyVim Install #1362

Closed weberam2 closed 6 months ago

weberam2 commented 6 months ago

Prerequisites

Neovim Version

NVIM v0.10.0-dev-777+gc6c21db82

Neorg setup

return {
  {
    "vhyrro/luarocks.nvim",
    priority = 1000,
    config = true,
  },
  {
    "nvim-neorg/neorg",
    build = ":Neorg sync-parsers",
    -- tag = "*",
    -- dependencies = { "nvim-lua/plenary.nvim" },
    dependencies = { "luarocks.nvim" },
    version = "*",
    config = true,
    -- config = function()
    --   require("neorg").setup({
    --     load = {
    --       ["core.defaults"] = {}, -- Loads default behaviour
    --       ["core.concealer"] = {}, -- Adds pretty icons to your documents
    --       ["core.dirman"] = { -- Manages Neorg workspaces
    --         config = {
    --           workspaces = {
    --             notes = "~/notes/notes",
    --             work = "~/notes/work",
    --           },
    --           default_workspace = "work",
    --         },
    --       },
    --     },
    --   })
    -- end,
  },
}

Actual behavior

When I load a .norg file, I no longer see any formatting/highlighting/syntax coloring, etc. When I run :Neorg nothing happens

However, lazy.nvim does say neorg is loaded

Expected behavior

...I want it to work again :(

Steps to reproduce

I think it's the breaking updates

Potentially conflicting plugins

No response

Other information

You'll see a lot of my neorg.lua file above has text commented out. That is because I have tried all sorts of ways to get this to work...

Does anyone have a LazyVim specific example that they know works?

Help

None

Implementation help

No response

pysan3 commented 6 months ago

Don't use config = true. I really wonder where people are getting that from.

Just use your own config.

More info:

vhyrro commented 6 months ago

config = true is perfectly fine :)

@weberam2 be sure to remove the build = ... directive from lazy and run :Lazy build neorg, that should fix it!

weberam2 commented 6 months ago

Ok, here is my neorg.lua file:

return {
  {
    "vhyrro/luarocks.nvim",
    priority = 1000,
    config = true,
  },
  {
    "nvim-neorg/neorg",
    dependencies = { "luarocks.nvim" },
    version = "*",
    -- config = true,
    config = function()
      require("neorg").setup({
        load = {
          ["core.defaults"] = {}, -- Loads default behaviour
          ["core.concealer"] = {}, -- Adds pretty icons to your documents
          ["core.dirman"] = { -- Manages Neorg workspaces
            config = {
              workspaces = {
                notes = "~/notes/notes",
                work = "~/notes/work",
              },
              default_workspace = "work",
            },
          },
        },
      })
    end,
  },
}

When I try :Lazy build neorg I get:

image

I don't know anything about luarocks so I tried checkhealth luarock.nvim

image

And I tried a checkhealth with neorg

image

But neorg is listed in Lazy...

image

weberam2 commented 6 months ago

ok, I uninstalled and reinstalled and I get these errors

image

weird that luarocks is not executable... I can chmod that I guess

weberam2 commented 6 months ago

Weird, there is no .rocks/bin/luarocks directory:

image

pysan3 commented 6 months ago

Please patiently follow instructions in https://github.com/pysan3/Norg-Tutorial/blob/main/MIGRATION-v8.md

It looks like you tried bunch of commands without order and now cache is broken. Please read each section one by one.

weberam2 commented 6 months ago

Hi everyone,

Ok, I was able to solve it by uninstalling luarocks and neorg, then:

sudo apt install lua5.1 liblua5.1-0-dev

then it loaded and installed with no issues :)

ghost commented 6 months ago

Don't use config = true. I really wonder where people are getting that from.

btw it's from the readme lazy installation snippet: https://github.com/nvim-neorg/neorg?tab=readme-ov-file#lazynvim

pysan3 commented 6 months ago

Don't use config = true. I really wonder where people are getting that from.

btw it's from the readme lazy installation snippet: https://github.com/nvim-neorg/neorg?tab=readme-ov-file#lazynvim

Ah I see. Thanks.

The latest code is now updated so that it works with setup({}) == config = true but it was not back then.

Let's wait for this for a better config cuz config = true is not a good experience anyways.

CRAG666 commented 6 months ago

 Error 15:47:21 msg_show.lua_error Lazy build neorg Error executing vim.schedule lua callback: ...hare/nvim/lazy/luarocks.nvim/lua/luarocks-nvim/rocks.lua:27: [luarocks] Failed to install from rockspec Warning: Failed searching manifest: Failed extracting manifest file: failed extracting /home/think-crag/.cache/luarocks/httpsluarocks.org/manifest-5.1.zip Warning: Failed searching manifest: Failed loading manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/: /home/think-crag/.cache/luarocks/httpsraw.githubusercontent.com_rocks-moonscript-org_moonrocks-mirror_master/manifest-5.1: No such file or directory Missing dependencies for neovim-rocks-user-rockspec 0.0-0: nvim-nio ~> 1.7 (not installed) lua-utils.nvim 1.0.2 (not installed) plenary.nvim 0.1.4 (not installed) nui.nvim 0.3.0 (not installed) pathlib.nvim ~> 2.1 (not installed)

neovim-rocks-user-rockspec 0.0-0 depends on nvim-nio ~> 1.7 (not installed) Installing https://luafr.org/luarocks/nvim-nio-1.7.0-1.src.rock cp: no se puede efectuar `stat' sobre '/home/think-crag/.cache/luarocks/https___luafr.org_luarocks/nvim-nio-1.7.0-1.src.rock': No existe el fichero o el directorio

Error: Failed installing dependency: https://luafr.org/luarocks/nvim-nio-1.7.0-1.src.rock - Failed unpacking rock file: /tmp/luarocks_luarocks-rock-nvim-nio-1.7.0-1-DdZ4yv/nvim-nio-1.7.0-1.src.rock: failed extracting /tmp/luarocks_luarocks-rock-nvim-nio-1.7.0-1-DdZ4yv/nvim-nio-1.7.0-1.src.rock

stack traceback: [C]: in function 'assert' ...hare/nvim/lazy/luarocks.nvim/lua/luarocks-nvim/rocks.lua:27: in function 'install' ...hare/nvim/lazy/luarocks.nvim/lua/luarocks-nvim/rocks.lua:60: in function 'ensure' /home/think-crag/.local/share/nvim/lazy/neorg/build.lua:14: in function </home/think-crag/.local/share/nvim/lazy/neorg/build.lua:9>