docs: add instructions to launch frecency via Lua (#188)

fix #185
This commit is contained in:
JINNOUCHI Yasushi 2024-03-24 16:50:08 +09:00 committed by GitHub
parent 9126d6bc0c
commit 9f4b0faae4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,12 @@ imported.
or to map to a key:
```lua
-- Bind command
vim.keymap.set("n", "<leader><leader>", "<Cmd>Telescope frecency<CR>")
-- Bind Lua function directly
vim.keymap.set("n", "<leader><leader>", function()
require("telescope").extensions.frecency.frecency {}
end)
```
Use a specific workspace tag:
@ -135,7 +140,14 @@ Use a specific workspace tag:
or
```lua
-- Bind command
vim.keymap.set("n", "<leader><leader>", "<Cmd>Telescope frecency workspace=CWD<CR>")
-- Bind Lua function directly
vim.keymap.set("n", "<leader><leader>", function()
require("telescope").extensions.frecency.frecency {
workspace = "CWD",
}
end)
```
Filter tags are applied by typing the `:tag:` name (adding surrounding colons)