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

Can't open file link #1544

Open
2 tasks done
yassinebenarbia opened this issue Jul 30, 2024 · 3 comments
Open
2 tasks done

Can't open file link #1544

yassinebenarbia opened this issue Jul 30, 2024 · 3 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@yassinebenarbia
Copy link

yassinebenarbia commented Jul 30, 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

Neorg setup

{
  load = {
    ["core.keybinds"] = {
      config = {
        hook = function(keybinds)
        end,
      }
    },
    ["core.defaults"] = {},
    ["core.concealer"] = {},
    ["core.dirman"] = {
      config = {
        workspaces = {
          notes = "~/Notes",
        },
      },
    },
  },

Actual behavior

After I've updated my plugins by today's date (2024-07-30) (Including Neorg), I couldn't open my linked files in the index.norg head

Expected behavior

Open the the file if exist, else crates it and open it

Steps to reproduce

I can't give exact steps to reproduce, but I can provide some information about the system
OS: NixOS (unstable)
Neovim version: 0.10.0
LuaJIT version: 2.1.1713773202
Neorg versoin: updated using the Lazy package manager from the main branch to the e5e797e commit

Potentially conflicting plugins

IDK, my best guess is that the default mapping of the somehow got overwritten by some other keybind (which is not correct since I don't map the key to anything)

Other information

This is the output of :checkhealth neorg

neorg: require("neorg.health").check()

Neorg Configuration ~
- Checking `load` table...
- OK Module declaration for `core.defaults` is well-formed
- OK Module declaration for `core.keybinds` is well-formed
- OK Module declaration for `core.dirman` is well-formed
- OK Module declaration for `core.concealer` is well-formed
- OK Default configuration for logger provided, Neorg will not output debug info.

Neorg Dependencies ~
- OK `luarocks` is installed.

Neorg Keybinds ~
- Neorg is configured to use keybind preset `neorg`
- WARNING Key `<CR>` conflicts with a key bound by the user. Neorg will not bind this key.
  - ADVICE:
    - consider mapping `<Plug>(neorg.esupports.hop.hop-link)` to a different key than the one bound by Neorg.

Help

if needed

@yassinebenarbia yassinebenarbia added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Jul 30, 2024
@max397574
Copy link
Contributor

it tells you in the healtcheck that the <cr> mapping isnt' created because it's already mapped somewhere
so search in your config (or your plugins) for <cr> and remove that mapping
or just map something to <Plug>(neorg.esupports.hop.hop-link) yourself (can also map cr manually)

@yassinebenarbia
Copy link
Author

yassinebenarbia commented Jul 30, 2024

It was mapped, to <CR>, I really don't understand why mapping <CR> to <CR> brakes it tho, also removing that keybind does not solve the issue, it now opens the explorer on a horizontal split, while also displaying the same warning when I :checkhealth neorg
Also:

  • <M-CR> keybind opens the file on a vertical split as intended.
  • After I checked,I have no other keybind mapped to <CR>.

Edit:

  • Forgot to mention that mapping the <CR> key to <Plug>(neorg.esupports.hop.hop-link) conserve the same behavior of opening the explorer in a horizontal split.
  • The keybind existed when opening a file link was possible (before the update)

@amalgame21
Copy link

Try checking the <C-M> keybinding.
https://neovim.io/doc/user/motion.html#up-down-motions

+  		or					+  
CTRL-M		or					CTRL-M <CR>
<CR>			[count] lines downward, on the first non-blank
			character linewise.

I have this problem today and I found that it is caused by a keymap of <c-m> unrelated to neorg.
Remove that keymap and the neorg file link works again.

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

3 participants