zk-org / zk-nvim

Neovim extension for zk
https://github.com/zk-org/zk
GNU General Public License v3.0
502 stars 40 forks source link

LSP can't find a notebook #157

Closed kuator closed 7 months ago

kuator commented 8 months ago

Check if applicable

Describe the bug

![Uploading Screenshot from 2023-12-29 22-22-15.png…]()

How to reproduce?

Try to :ZkNew and it throws an error

zk configuration

I don't have any .zk folders

Neovim configuration

let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
  silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

call plug#begin()
Plug 'mickael-menu/zk-nvim'
call plug#end()

lua << EOF
require("zk").setup()
EOF

Environment

$ echo $ZK_NOTEBOOK_DIR
/home/evakuator/dev/some
zk 0.14.0
system: Linux 6.2.0-39-generic x86_64 GNU/Linux
NVIM v0.10.0-dev-d667e0e
Build type: RelWithDebInfo
LuaJIT 2.1.1700008891
Run "nvim -V1 -v" for more info
kuator commented 8 months ago

If I manually init the notebook with zk init, then it creates a hidden folder .zk inside my $ZK_NOTEBOOK_DIR and it starts working. Ddid I have to manually zk init it? I thought it was this plugin's duty instead.

jurica commented 7 months ago

:ZkNew isn't meant to initialize a notebook if that hasn't been done before, it's just a convenience wrapper for zk new in neovim. This plugin doesn't provide such a convenience wrapper for notebook initialisation. IMHO that's not really necessary for a one time operation like that. I'll close this ticket for now.

kuator commented 7 months ago

:ZkNew isn't meant to initialize a notebook if that hasn't been done before, it's just a convenience wrapper for zk new in neovim. This plugin doesn't provide such a convenience wrapper for notebook initialisation. IMHO that's not really necessary for a one time operation like that. I'll close this ticket for now.

Yes, but I think it should be at least mentioned

jurica commented 5 months ago

Sorry I was very busy in the past few weeks and this issue had gone a bit out of sight. @kuator may I ask you to file a PR with the improvement for the docs you're looking for?

kuator commented 5 months ago

Sorry I was very busy in the past few weeks and this issue had gone a bit out of sight. @kuator may I ask you to file a PR with the improvement for the docs you're looking for?

Ok, will do