nvim-neorg / neorg

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

Links to norg files not working #239

Closed Je12emy closed 2 years ago

Je12emy commented 2 years ago

Prerequisites

Neovim Version

NVIM v0.7.0-dev+717-gf37c5f180

Branch

master

Loaded modules

Loaded Modules

--- PRINTING ALL LOADED MODULES ---
core.norg.esupports
core.scanner
core.ui.text_popup
core.norg.completion
core.norg.concealer.preset_diamond
core.keybinds.default_keybinds
core.norg.concealer.preset_varied
core.norg.concealer.preset_basic
core.neorgcmd
core.mode
core.autocommands
core.norg.concealer
core.storage
core.norg.news
core.norg.esupports.metagen
core.ui.selection_popup
core.neorgcmd.commands.module.list
core.highlights
core.norg.dirman
core.norg.esupports.hop
core.integrations.treesitter
core.norg.manoeuvre
core.keybinds
core.integrations.nvim-cmp
core.neorgcmd.commands.return
core.norg.qol.todo_items
core.ui
core.defaults
core.neorgcmd.commands.module.load
core.norg.journal

Actual behavior

Link should be opened

Expected behavior

The link under the cursor should open the norg file after hitting [ENTER]

Potentially conflicting plugins

No response

Other information

I have the following file structure:

dio@pop-os:~/wiki/diary$ tree .
.
├── [Hidden].norg
├── college.norg
├── index.norg
├── journal
│   └── 2021
│       └── 12
│           └── 10.norg
├── norg_guide.norg
└── software_development
    ├── git.norg
    ├── repository_pattern.norg
    └── software_development.norg

4 directories, 8 files

So I would like to link some files on my index.norg with the new link syntax:

 Other entries I've written as reminders and usefull information
    - {:software_development:* /software_development/}
    - {:college:* /college}

This fails to open the file and displays a new buffer for fixing this link, but it seems to always fail.

Help

No

Implementation help

I selected No

mrossinek commented 2 years ago

Your link syntax seems a bit incorrect here. If you want to link to a heading target called * college inside of the college.norg file you need to write:

{:college:* college}

Note, that this is case-senstive! I don't quite know what you're trying to do in the software dev case which you posted. software_development appears to be a directory and not a file. You can link to the file software_development/software_development like so:

{:software_development/software_development:}
Je12emy commented 2 years ago

Ohhh sorry, I guess I didn't quite understand the style guide too much, thank you for you help!