From da59b6ec8a6216cfae62037f69d369236d1a498d Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 15 Oct 2023 18:07:01 +0200 Subject: [PATCH] Use telescope call hierarchy --- after/plugin/lsp/call-hierarchy.lua | 8 -------- after/plugin/lsp/lsp-common.lua | 5 ++++- lua/myworkflow/packer.lua | 3 --- 3 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 after/plugin/lsp/call-hierarchy.lua diff --git a/after/plugin/lsp/call-hierarchy.lua b/after/plugin/lsp/call-hierarchy.lua deleted file mode 100644 index c8cc576..0000000 --- a/after/plugin/lsp/call-hierarchy.lua +++ /dev/null @@ -1,8 +0,0 @@ --- configure the litee.nvim library -require('litee.lib').setup({}) --- configure litee-calltree.nvim -require('litee.calltree').setup({ - on_open = "popout", -}) - -vim.keymap.set("n", "ci", ":lua vim.lsp.buf.incoming_calls()") diff --git a/after/plugin/lsp/lsp-common.lua b/after/plugin/lsp/lsp-common.lua index 1339114..3e1cbad 100644 --- a/after/plugin/lsp/lsp-common.lua +++ b/after/plugin/lsp/lsp-common.lua @@ -1,10 +1,13 @@ vim.api.nvim_create_autocmd('LspAttach', { callback = function(ev) + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'gr', builtin.lsp_references); + vim.keymap.set('n', 'gci', builtin.lsp_incoming_calls); + local opts = { noremap=true, silent=false, buffer = ev.buf } vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) vim.keymap.set('n', 'ga', 'lua vim.lsp.buf.code_action()', opts) - vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) vim.keymap.set('n', 'K', 'lua vim.lsp.buf.hover()', opts) vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) vim.keymap.set('n', '', 'lua vim.lsp.buf.signature_help()', opts) diff --git a/lua/myworkflow/packer.lua b/lua/myworkflow/packer.lua index e79973f..9cd1a0c 100644 --- a/lua/myworkflow/packer.lua +++ b/lua/myworkflow/packer.lua @@ -18,9 +18,6 @@ return require('packer').startup(function(use) use 'simrat39/rust-tools.nvim' use 'akinsho/flutter-tools.nvim' - -- Call hierarchy - use {'ldelossa/litee-calltree.nvim', requires = 'ldelossa/litee.nvim'} - -- debugging use 'mfussenegger/nvim-dap' use 'leoluz/nvim-dap-go'