Closed smithbm2316 closed 2 years ago
I've added an API wrapper yesterday which is now no longer telescope specific. @smithbm2316 could you check if this could also work for you?
There is require("zk").api
which is a wrapper around the LSP commands, and require("zk").cmd
which uses the api and implements some default behavior for zk.new
and zk.index
. The latter is meant to be directly used in a command or keybinding.
There are also examples in the README.
@mickael-menu you should be able to just copy and paste the
zk.next_link
andzk.prev_link
functions for now into your config if you want that Vimwiki-like jumping between next/previous links until this PR is finished and merged.
Thanks, that's great!
Yeah I think we should focus on merging #5 first to avoid you working on two different wrapper implementations. Then we can iterate with more PRs.
There is
require("zk").api
which is a wrapper around the LSP commands, andrequire("zk").cmd
which uses the api and implements some default behavior forzk.new
andzk.index
. The latter is meant to be directly used in a command or keybinding.
The api
namespace is perfect for the LSP commands. For the higher-level commands, maybe it would be more convenient to put them at the root level directly? e.g. require("zk").new()
Closing as we have decided to go with #5 as our initial base featureset
I unfortunately had less time than I was hoping to this weekend. It ended up being a lot more hectic than I anticipated. However, I've done some refactoring of my initial commit to include new API functions for the new
zk.list
andzk.tags.list
LSP commands, as well aszk.next_link
andzk.prev_link
functions to allow for easy binding to jump to the next and previous note links using Neovim's newvim.diagnostic
API (this would close #4). Any and all feedback is welcome, and I can't promise that all of the functions work fully at the moment, but are rather initial ideas for how they might work. This currently is still a work in progress, but I think it at least should give an idea of the vision I had for the API wrappers, while #5 focuses on the tightly-integrated Telescope behavior.As soon as I have some time one evening this week I will continue to refine this, do some cleanup, add some
asserts
for the various configuration options for thezk.list
andzk.tags.list
commands once I have a chance to read through all of the options in more detail, and write some docs. @mickael-menu you should be able to just copy and paste thezk.next_link
andzk.prev_link
functions for now into your config if you want that Vimwiki-like jumping between next/previous links until this PR is finished and merged.