From 09b4d0c7a285d14c330bbd6ec8db0761ddc2bc64 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 21 Dec 2025 10:26:22 +0100 Subject: feat: add LSP references and fix keymap for recent files in telescope plugin --- lua/ache/lazy.lua | 3 ++- lua/ache/plugins/telescope.lua | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/ache/lazy.lua b/lua/ache/lazy.lua index be9ad75..e01d3cb 100644 --- a/lua/ache/lazy.lua +++ b/lua/ache/lazy.lua @@ -120,6 +120,7 @@ vim.api.nvim_create_autocmd("LspAttach", { end local tele_defs_action = "Telescope lsp_definitions" + local tele_refs_action = "Telescope lsp_references" local tele_impl_action = "Telescope lsp_implementations" local tele_typedefs_action = "Telescope lsp_type_definitions" local tele_diag_action = "Telescope diagnostics bufnr=0" @@ -136,7 +137,7 @@ vim.api.nvim_create_autocmd("LspAttach", { map("E", vim.diagnostic.open_float, "Open Diagnostics") map("k", vim.lsp.buf.signature_help, "Signature Help") map("rn", vim.lsp.buf.rename, "Rename") - map("f", vim.lsp.buf.format, "Format") + map("lf", vim.lsp.buf.format, "Format") map("gR", "Telescope lsp_references", "Show LSP references") map("gD", vim.lsp.buf.declaration, "Go to declaration") diff --git a/lua/ache/plugins/telescope.lua b/lua/ache/plugins/telescope.lua index e165ef1..9462c16 100644 --- a/lua/ache/plugins/telescope.lua +++ b/lua/ache/plugins/telescope.lua @@ -72,7 +72,8 @@ return { telescope.load_extension("scope") vim.keymap.set("n", "ff", "Telescope find_files", { desc = "Fuzzy find files in cwd" }) - vim.keymap.set("n", "fr", "Telescope oldfiles", { desc = "Fuzzy find recet files" }) + vim.keymap.set("n", "fr", "Telescope lsp_references", { desc = "Fuzzy find references files" }) + vim.keymap.set("n", "fR", "Telescope oldfiles", { desc = "Fuzzy find recet files" }) vim.keymap.set("n", "fs", "Telescope live_grep", { desc = "Find string in cwd" }) vim.keymap.set( "n", -- cgit v1.3-2-g11bf