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

link doesn't work anymore #1564

Open
2 tasks done
ilan-schemoul opened this issue Aug 27, 2024 · 10 comments
Open
2 tasks done

link doesn't work anymore #1564

ilan-schemoul opened this issue Aug 27, 2024 · 10 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@ilan-schemoul
Copy link

ilan-schemoul commented Aug 27, 2024

Prerequisites

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

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

@ilan-schemoul ilan-schemoul added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Aug 27, 2024
@max397574
Copy link
Contributor

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

@nvim-neorg nvim-neorg deleted a comment Aug 27, 2024
@ilan-schemoul
Copy link
Author

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

@benlubas
Copy link
Contributor

benlubas commented Sep 1, 2024

@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
Copy link

yassinebenarbia commented Sep 3, 2024

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
Copy link
Author

Does pressing to open a local file work correctly for you? I have a similar issue here #1544 (comment), 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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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

@ilan-schemoul
Copy link
Author

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
Copy link

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

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

4 participants