Closed bangedorrunt closed 3 years ago
I figured it out. All I need is cd
to my note directory and open Neovim from there. I normally use Startify plugin to quickly open my note. And this way doesn't work with Neuron.
We should address this.
I'm having the same issue. But for me, it never ends. (and I am starting Neovim from within the notes directory).
May very well be related to https://github.com/fiatjaf/neuron.vim/issues/22 - which might only be a problem on my system!
My issue, not yours :)
I'll have a look at this one too since I am seeing it - I think the caching "issue" should probably be non-blocking and maybe it should only use it once it is available and fallback to a live query when not ready. Maybe also a setting to turn it off all together.
The problem is that neuron.vim
should be still prepopulating the cache whenever one opens any Zettel, unless this configuration is missing something, which is very likely given my inexperience with Vim plugins:
@babygau's issue with opening from different directories shouldn't be a concern, I don't understand it.
Actually these parts might be relevant:
I can't simulate any situation in which fnamemodify(expand("%:p")
wouldn't give me the correct path, but maybe in your system that happens when you open zettels from other places. The solution would be to manually set g:neuron_dir
.
cool and thanks for the lead - I'll come back with what I find 👍
Probably relevant for my case: I often open the directory (vim .
), which starts in Explore mode - showing the file tree - so when I gzz
I don't technically have any zettel open.
@vcavallo fnamemodify(expand("%:p")
doesn't work on these conditions. We must find something that gives us the current directory so we can identify it as part of the Zettelkasten and proceed to do the normal things.
I have fixed one problem so far. In my case it was because my path had a space in it - needed to run the dir through fnameescape
. @vcavallo when you run vim .
is that inside your zettelkasten directory? Also, do you have g:neuron_dir
set in your vimrc or not?
Ok, I have created a PR for this: https://github.com/fiatjaf/neuron.vim/pull/27
I believe this has been addressed, let me know if you still have issues.
Hi ! I also have the message waiting until chache is populated...
and then nothing happens.
I haven't quite understood what's the matter here...
Hi @jrekier thanks for that - could you tell me the following:
Hi @fenetikm, thanks for your comment. Here are the answers to your questions:
Hope it's helpful ! Thanks for your help !
Hi @jrekier thanks for that - just wanted to check that you are on the latest version of the plugin too?
Could you please give me a list of steps that you did. e.g.
[[abcd1234]]
)gzo
Also making sure that you have a neuron.dhall
file in your zettelkasten directory?
Thanks.
Hi @fenetikm
I think I am using the latest version. I have just moved to this fork from the original plugin yesterday. I started off by cleaning my list of plugins and installed the latest one. Here is a screeshot of where I'm standing after PlugUpdate
The bug happens after I do the following:
neuron search -e
, select and open a zettelgzz
anywhere produces the following message waiting until chache is populated...
which stays there and nothing happens.alternative to 1. : the bug also happens when I open a zettel directly (i.e. not using the neuron
command), e.g. nvim 03420c42.md
will open a zettel in neovim and then step 2. proceeds with the same bug.
Here is the content of my /Users/jerem/zettelkasten/neuron.dhall
:
{ siteTitle =
"My Zettelkasten"
, theme =
"red"
}
I am missing something there ?
Thanks for the details - will see if I can reproduce what you are seeing and let you know.
@jrekier oh hang on, which version of neuron are you running? (run neuron --version
) - I am on 1.1.3.0.
Oh my! I'm on 0.6.5.2 ...
I just did a git pull
on the neuron directory and this did not fix it! I must be doing something wrong with nix
. How can I update to the latest version ? (sorry for the trouble !)
Ahh hopefully that is it. Have a look at the installation page that also mentions how to upgrade it.
nix-env -if https://github.com/srid/neuron/archive/master.tar.gz
yes!! That seems to have fixed it! Just checking the other commands atm and everything seems to fall into place. Thank you so much for your help @fenetikm ! Sorry that it was due to such a stupid oversight from my side...
No probs at all - finding this and what happened to you may help others. Cheers.
Not sure if it is helpful, or another bug - I found that having this in my vimrc would have the unwanted effect:
let g:neuron_dir="~/Documents/zettle/"
By removing it, I'm able to use gzz
and it is almost instant. I need to be in the zettel directory however. I figure I need declare the path in another way.
Edit
This works! Looks like it wanted an absolute path.
let g:neuron_dir=expand("~/Documents/zettle/")
Thanks @craigdallimore - yeah was just about to ask what the complete path was and if that would work. Cheers.
I also wanted to add, that setting the neuron_dir path in my config had me stuck with the waiting until cache is populated...
prompt when opening vim outside the zettelkasten directory and runnging gzz
Making the following change fixed the problem for me
let g:neuron_dir=expand("~/Documents/zettle")
to
let g:neuron_dir=expand("~/Documents/zettle/")
So make sure that:
let g:neuron_dir=expand("~/zettelkasten/")
Hi,
Sometimes, it takes forever to wait for cache populated. I have to restart Neovim to make it work from time to time.
Moreover, how to make Neuron start caching when I first open Neovim. At this moment, I have to
gzr
everytime I open my zettel note.