fixes, also remove `:Telescope zk tags`

pull/14/head
Karim Abou Zeid 2 years ago
parent 708d3914db
commit 43557a395f

@ -407,9 +407,9 @@ end)
```
## Telescope Plugin
> Not recommended, instead just use the [:ZkNotes and :ZkTags commands](#built-in-commands).
> Not recommended, instead just use the [:ZkNotes command](#built-in-commands).
It's possible (but unnecessary) to also load the notes / tags pickers as a telescope plugin.
It's possible (but unnecessary) to also load the notes picker as a telescope plugin.
```lua
require("telescope").load_extension("zk")
@ -417,5 +417,5 @@ require("telescope").load_extension("zk")
```vim
:Telescope zk notes
:Telescope zk tags
:Telescope zk notes createdAfter=3\ days\ ago
```

@ -6,15 +6,8 @@ local function show_notes(opts)
zk.edit(opts, { picker = "telescope", telescope = opts })
end
---@param opts? table additional options for zk, telescope options, all optional and in one table
---@see https://github.com/mickael-menu/zk/blob/main/docs/editors-integration.md#zktaglist
local function show_tags(opts)
require("zk.commands").get("ZkTags")(opts, { picker = "telescope", telescope = opts })
end
return require("telescope").register_extension({
exports = {
notes = show_notes,
tags = show_tags,
},
})

@ -44,7 +44,7 @@ commands.add("ZkMatch", function(options)
end, { needs_selection = true })
commands.add("ZkTags", function(options)
zk.pick_tags(options, picker_options, function(tags)
zk.pick_tags(options, { title = "Zk Tags" }, function(tags)
tags = vim.tbl_map(function(v)
return v.name
end, tags)

Loading…
Cancel
Save