Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching Journal hangs Neovim #1393

Open
2 tasks done
maikelthedev opened this issue Apr 16, 2024 · 4 comments
Open
2 tasks done

Launching Journal hangs Neovim #1393

maikelthedev opened this issue Apr 16, 2024 · 4 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@maikelthedev
Copy link

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

0.9.5

Neorg setup

{
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
lazy = false, -- specify lazy = false because some lazy.nvim distributions set lazy = true by default
-- tag = "",
version = "
",
dependencies = { "nvim-lua/plenary.nvim", "vhyrro/luarocks.nvim"},
config = function()
require("neorg").setup {
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.concealer"] = {
config = {
icons = {
code_block = {
content_only = true,
conceal = true,
},
},
},
}, -- Adds pretty icons to your documents
["core.export"] = {},
["core.dirman"] = { -- Manages Neorg workspaces
config = {
default_workspace = "notes",
workspaces = {
notes = "~/notes",
},
},
},
},
}
end,
},

Actual behavior

Running

:Neorg journal today

makes Neovim unresponsive. It opens the day but crashes. I'm using kitty.

Expected behavior

open the day and let me use Neovim

Steps to reproduce

above

Potentially conflicting plugins

No response

Other information

No response

Help

None

Implementation help

No response

@maikelthedev maikelthedev added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Apr 16, 2024
@pysan3
Copy link
Contributor

pysan3 commented Apr 17, 2024

Neorg won't work if you have build = ":Neorg sync-parsers".
Are you sure you have neorg setup correctly?
And what version of neorg are you currently using?

@quinnvoker
Copy link

quinnvoker commented Apr 26, 2024

I'm experiencing the same issue with creating a new journal entry for today. Using the latest stable version of neorg (v8.4.1), which works for editing other .norg files, but specifically running :Neorg journal today opens the correct file in nvim but immediately hangs.

I'm using Lazy to set up neorg, and this is my config:

{
  "nvim-neorg/neorg",
  opts = {
    load = {
      ["core.defaults"] = {}, -- Loads default behaviour
      ["core.concealer"] = {}, -- Adds pretty icons to your documents
      ["core.dirman"] = { -- Manages Neorg workspaces
        config = {
          workspaces = {
            notes = "~/notes",
          },
        },
      },
      ["core.journal"] = {
        config = {
          journal_folder = "journal",
          strategy = "flat",
          workspace = "notes",
        },
      },
      ["core.keybinds"] = {
        config = {
          hook = function(keybinds)
            keybinds.map("norg", "n", "<tab>", "za")
          end,
          neorg_leader = "<Leader>",
        },
      },
      ["core.completion"] = {
        config = {
          engine = "nvim-cmp",
        },
      },
      ["core.export"] = {},
      ["core.export.markdown"] = {},			
    },
  },
  dependencies = { "luarocks.nvim" },
  lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
  version = "*", -- Pin Neorg to the latest stable release
  config = true,
},

I did some testing by selectively commenting out parts of my config, and it specifically seems to be an issue with core.concealer, as commenting out everything in load except the defaults and concealer configs still causes the hang when opening today's journal. Similarly, commenting out only the core.concealer line allows the journal to open and be edited as expected.

@PatMulligan
Copy link

Is this only happening for you guys with the journal? My system often seems to all of a sudden start to hang (first it behaves normally) regardless of if it's :Neorg journal today or :Neorg index. The process starts to max out the CPU and the fans go wild

I have yet to find the steps to reproduce it reliably... but using nvim v0.9.4

return {
  {
    "nvim-neorg/neorg",
    dependencies = { "luarocks.nvim" },
    version = "*",
    config = function()
      require("neorg").setup {
        load = {
          ["core.defaults"] = {},
          ["core.concealer"] = {},
          ["core.dirman"] = {
            config = {
              workspaces = {
                notes = "~/notes",
              },
              default_workspace = "notes",
            },
          },
        },
      }

      vim.wo.foldlevel = 99
      vim.wo.conceallevel = 2
    end,
  }
}

@benlubas
Copy link
Contributor

@PatMulligan I'd try 9.5, I remember having a bunch of issues like you describe with 9.4 as well, and they were fixed with 9.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

5 participants