Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

New note links full path on system #25

Open
entropitor opened this issue May 25, 2021 · 2 comments
Open

New note links full path on system #25

entropitor opened this issue May 25, 2021 · 2 comments

Comments

@entropitor
Copy link

When I create a new note with the nice <CR> bindings, it links the full path to the note (including the path to the zk notebook itself) which will break on other systems. How can I avoid that?

Also it seems to put the path in quotes, which the zk LSP then complains about. Is this a bug in the neovim plugin or zk LSP server?

@mickael-menu
Copy link
Collaborator

mickael-menu commented May 25, 2021

This is a zk.nvim issue, but you can reproduce the same feature with vanilla zk, by triggering the LSP code actions in your editor over the current selection. For example with this mapping with Neovim's built-in LSP client:

buf_set_keymap("v", "<CR>", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)

See in context

You might need to rebuild your Neovim's nightly, as I recently sent a fix to Neovim to handle range code action properly: neovim/neovim#14555

@entropitor
Copy link
Author

The code action is working fine indeed!

So I guess, zk.nvim should use the code that you have on that ticket instead of doing it in the plugin itself? Let the LSP handle it

Thank you so much for the neovim fix! 😍 I noticed it before in with the typescript LSP but I thought it was a bug in the typescript server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants