From 17351b228abd9f953c2789f98b1403ea496b30a4 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 9 Jun 2024 14:09:13 +0200 Subject: use telescope-coc --- lua/maps/coc.lua | 8 ++++---- lua/plugins.lua | 11 +++++++++++ lua/telescope_config.lua | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lua/maps/coc.lua b/lua/maps/coc.lua index d7b2b3c..85eacfc 100644 --- a/lua/maps/coc.lua +++ b/lua/maps/coc.lua @@ -38,10 +38,10 @@ vim.api.nvim_set_keymap("n", "[g", "(coc-diagnostic-prev)", {silent = true vim.api.nvim_set_keymap("n", "]g", "(coc-diagnostic-next)", {silent = true}) -- GoTo code navigation. -vim.api.nvim_set_keymap("n", "gd", "(coc-definition)", {silent = true}) -vim.api.nvim_set_keymap("n", "gy", "(coc-type-definition)", {silent = true}) -vim.api.nvim_set_keymap("n", "gi", "(coc-implementation)", {silent = true}) -vim.api.nvim_set_keymap("n", "gr", "(coc-references)", {silent = true}) +vim.api.nvim_set_keymap("n", "gd", ":Telescope coc definitions", {silent = true}) +vim.api.nvim_set_keymap("n", "gy", ":Telescope coc type_definitions", {silent = true}) +vim.api.nvim_set_keymap("n", "gi", ":Telescope coc implementations", {silent = true}) +vim.api.nvim_set_keymap("n", "gr", ":Telescope coc references", {silent = true}) -- Use K to show documentation in preview window. vim.api.nvim_set_keymap("n", "K", ":call v:lua.show_documentation()", diff --git a/lua/plugins.lua b/lua/plugins.lua index 9819abf..9ab9171 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -125,6 +125,17 @@ return require("packer").startup(function(use) } } } + + use { + "fannheyward/telescope-coc.nvim", + commit = "0819a790dc95336ce2a954513434a76bb76c41c7", + requires = { + { + "nvim-lua/plenary.nvim", + commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" + } + } + } -- Telescope end -- Markdown diff --git a/lua/telescope_config.lua b/lua/telescope_config.lua index 04719cb..0f1504b 100644 --- a/lua/telescope_config.lua +++ b/lua/telescope_config.lua @@ -10,3 +10,4 @@ require("telescope").setup({ require("telescope").load_extension("fzf") require("telescope").load_extension("file_browser") require("telescope").load_extension("conflicts") +require("telescope").load_extension("coc") -- cgit v1.2.3-18-g5258