Skip to content

Commit

Permalink
bump docsets
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Mar 29, 2024
1 parent eb9cd18 commit ea2795d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"telescope-docsets.nvim": {
"branch": "main",
"repo": "git@github.com:willruggiano/telescope-docsets.nvim",
"rev": "6cdf939598f184db69578a2658804d06c128194b",
"rev": "7a4f936432a4453e023cdf074fe2f596df6ccbf4",
"type": "git"
},
"telescope-fzf-native.nvim": {
Expand Down
15 changes: 7 additions & 8 deletions plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ return function()
end,
{ desc = "Open Anything™" },
},
["<space>k"] = {
function()
vim.ui.input({ prompt = "Query > " }, function(pattern)
require("telescope").extensions.docsets.query(pattern, { previewer = false })
end)
end,
{ desc = "Docsets" },
},
["<leader>k"] = {
function()
require("telescope").extensions.docsets.find_word_under_cursor { previewer = false }
Expand All @@ -114,4 +106,11 @@ return function()
for key, opts in pairs(mappings) do
nnoremap(key, opts[1], opts[2])
end

vim.api.nvim_create_user_command("K", function(args)
require("telescope").extensions.docsets.query(args.fargs or {}, { previewer = false })
end, {
desc = "Query docsets",
nargs = "*",
})
end

0 comments on commit ea2795d

Please sign in to comment.