nvim-neorg / neorg

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

link doesn't work anymore #1564

Open ilan-schemoul opened 3 months ago

ilan-schemoul commented 3 months ago

Prerequisites

Neovim Version

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068

Neorg setup

return {
  "nvim-neorg/neorg",
  version = "v9.x.x",
  ft = "norg", -- lazy load on file type
  cmd = "Neorg", -- lazy load on command
  config = function()
    vim.api.nvim_create_autocmd('FileType', {
      pattern = 'norg',
      callback = function (_)
        vim.g.maplocalleader = "g"
      end,
    })
    require("neorg").setup({
      load = {
        ["core.defaults"] = {
          config = {
            disable = {
              "core.esupports.indent",
            },
          },
        },
        ["core.esupports.indent"] = {
          config = {
            format_on_enter = false,
            format_on_escape = false,
          },
        },
        ["core.concealer"] = {},
        ["core.dirman"] = {
          config = {
            workspaces = {
              notes = "~/notes",
            },
            default_workspace = "notes",
          },
        },
        ["core.keybinds"] = {
          config = {
            default_keybinds = true,
          },
        },
      },
    })
    vim.api.nvim_create_autocmd("Filetype", {
      pattern = "norg",
      callback = function()
        vim.keymap.set("i", "<C-b>", "<Plug>(neorg.itero.next-iteration)", { buffer = true })
      end,
    })

    vim.wo.foldlevel = 99
  end,
}

Actual behavior

Enter on {https://github.com/nvim-neorg/neorg} (found in the example) => no link opened

Expected behavior

Open link

Steps to reproduce

Type enter on {https://github.com/nvim-neorg/neorg} (found in the example)

Potentially conflicting plugins

No response

Other information

No response

Help

None

Implementation help

No response

max397574 commented 3 months ago

is <cr> mapped correctly? because it works for me so it's obviously not neorg being completely broken

try :nmap <cr> it should output something like this

n  <CR>        *@<Plug>(neorg.esupports.hop.hop-link)                                                                                                            
                 [neorg] Jump to Link
ilan-schemoul commented 3 months ago

Yes I just checked it's set to hop-link and it works flawlessly for relative link such as {:./www.png:}

benlubas commented 2 months ago

@ilan-schemoul This works for me. I suspect it's your operating system causing issues.

Could you provide information about the system you're on?

yassinebenarbia commented 2 months ago

Does pressing <CR> to open a local file work correctly for you? I have a similar issue here Can't open file link #1544, and if you found them identical can you please mention it in your issue message?

ilan-schemoul commented 2 months ago

Does pressing to open a local file work correctly for you? I have a similar issue here https://github.com/nvim-neorg/neorg/issues/1544#issue-2436663238, and if you found them identical can you please mention it in your issue message?

Local file works. Example "See also {:/home/ilan/nvim-config/todo.norg:}" I press file opens

@ilan-schemoul This works for me. I suspect it's your operating system causing issues. Could you provide information about the system you're on?

@benlubas

⟩ uname -a
Linux ILTY-401 6.5.0-1025-oem #26-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 1
2:35:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
benlubas commented 2 months ago

Check the xdg-open mime types for links. And make sure that xdg-opening that link from terminal works.

Also want to confirm that this isn't wsl right? It's just a bare metal Linux machine?

yassinebenarbia commented 2 months ago

Local file works. Example "See also {:/home/ilan/nvim-config/todo.norg:}" I press file opens

That does not seem to work for me (using either relative or absolute path), can you share your exact neorg version along with the neovim version. @ilan-schemoul

Check the xdg-open mime types for links

After running xdg-mime query filetype <path> I get this output text/plain

And make sure that xdg-opening that link from terminal works.

And after running xdg-open <path> I get this output (objectpath '/org/freedesktop/portal/desktop/request/1_22/t',) @benlubas

benlubas commented 2 months ago

I was talking about the http link. Not your issue. These seem like two separate issues.

ilan-schemoul commented 2 months ago

Check the xdg-open mime types for links. And make sure that xdg-opening that link from terminal works.

Yes it works. xdg-open "https://github.com/nvim-neorg/neorg" opens the page on firefox (from an embedded nvim terminal) {https://github.com/nvim-neorg/neorg} does not open anything 81ee90c 9.1.1 neorg

yassinebenarbia commented 2 months ago

Yes it works. xdg-open "https://github.com/nvim-neorg/neorg" opens the page on firefox (from an embedded nvim terminal) {https://github.com/nvim-neorg/neorg} does not open anything

I have the exact same behavior with neorg 9.1.1 ba35900

ilan-schemoul commented 1 week ago

Tested again on 0.10.2 and neorg 9.1.1 81ee90c. Still not working type enter {https://github.com/nvim-neorg/neorg}, local links still work. Ubuntu 22 ~ ⟩ uname -a Linux ILTY-401 6.8.0-48-generic #48~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 7 11:24:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Bare metal linux @benlubas @max397574 @vhyrro

benlubas commented 1 week ago

If we can't reproduce you have to debug yourself.

And we can't reproduce.