fiatjaf / neuron.vim

📝 Manage your Zettelkasten in {n}vim.
MIT License
83 stars 21 forks source link

Missing Backlinks #45

Closed beandipper closed 3 years ago

beandipper commented 3 years ago

While editing Zetteln, I don't see any backlinks in the top of the file, instead it shows a constant '0 backlinks'.

This was on a freshly installed Neuron + neovim + neuron.vim.

I checked the served rib generated html pages to make sure that the backlinks that should be visible in nvim are. The backlinks are displayed on the bottom of the HTML pages, but the same zettel in neuron.vim still shows '0 backlinks' at the top of the file.

Neuron Version: 1.1.6.1 neuron.vim version: downloaded on 10th Nov. 2020 using neuron.dhall inside flat directory containing Zetteln

fiatjaf commented 3 years ago

Are other zettels in the same directory ok? Or every zettel displays 0 backlinks?

beandipper commented 3 years ago

It's the same for every Zettel

fenetikm commented 3 years ago

Will have a look into it - @beandipper does opening the backlinks buffer show you any backlinks? (gzv)

fiatjaf commented 3 years ago

The array of backlinks for every zettel is built inside neuron.vim using the output from neuron --query. It would be good to see that output or maybe a reproducible case with two zettels if that's easier.

beandipper commented 3 years ago

I'm not sure which part of the JSON contains the backlinks, if it is the content of the "t": "Link" section, here is an example from neuron query

{ "t": "Link", "c": [ [ "", [], [] ], [ { "t": "Str", "c": "z:/1795fc73" } ], [ "z:/1795fc73", "" ] ] },

Also I used the migration script recommended to move from the old <> angle bracket links to the newer wiki style recommended from the neuron project author. Maybe that influenced something

fenetikm commented 3 years ago

thanks @beandipper - can confirm I am seeing it too, will see what is what.

fenetikm commented 3 years ago

Ok, have pushed an update to master. Please try that and report back. Thanks.

beandipper commented 3 years ago

I've ran :PlugUpdate and :PlugUpgrade, but it seems to have not made a difference. I also refreshed the cache with gzr, but still no change. Are those the only to commands I have to give within vim to pull the latest update?

The gzv command to display backlinks also doesn't show anything

fenetikm commented 3 years ago

Sorry @beandipper - you indeed did the right commands. I didn't check the push. Please try again.

beandipper commented 3 years ago

Thank you for your help, it does seem to work now, solved! image

Do you think it would be possible in the future to display a preview of the backlinks when hovering over them, showing the information that the neuron webpage backlinks show on the bottom of the HTML pages

fenetikm commented 3 years ago

Great - glad to know it is resolved. Yeah I would expect some kind of hover would be possible. There are murmurs of an LSP being created so will see what happens on that front first as that would have hovers out of the box.