Use telescope call hierarchy

This commit is contained in:
Marco 2023-10-15 18:07:01 +02:00
parent 394911982d
commit da59b6ec8a
3 changed files with 4 additions and 12 deletions

View File

@ -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", "<leader>ci", ":lua vim.lsp.buf.incoming_calls()<CR>")

View File

@ -1,10 +1,13 @@
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev) callback = function(ev)
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>gr', builtin.lsp_references);
vim.keymap.set('n', '<leader>gci', builtin.lsp_incoming_calls);
local opts = { noremap=true, silent=false, buffer = ev.buf } local opts = { noremap=true, silent=false, buffer = ev.buf }
vim.keymap.set('n', '<leader>gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts) vim.keymap.set('n', '<leader>gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
vim.keymap.set('n', '<leader>ga', '<Cmd>lua vim.lsp.buf.code_action()<CR>', opts) vim.keymap.set('n', '<leader>ga', '<Cmd>lua vim.lsp.buf.code_action()<CR>', opts)
vim.keymap.set('n', '<leader>gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
vim.keymap.set('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts) vim.keymap.set('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
vim.keymap.set('n', '<leader>gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) vim.keymap.set('n', '<leader>gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.keymap.set('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) vim.keymap.set('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)

View File

@ -18,9 +18,6 @@ return require('packer').startup(function(use)
use 'simrat39/rust-tools.nvim' use 'simrat39/rust-tools.nvim'
use 'akinsho/flutter-tools.nvim' use 'akinsho/flutter-tools.nvim'
-- Call hierarchy
use {'ldelossa/litee-calltree.nvim', requires = 'ldelossa/litee.nvim'}
-- debugging -- debugging
use 'mfussenegger/nvim-dap' use 'mfussenegger/nvim-dap'
use 'leoluz/nvim-dap-go' use 'leoluz/nvim-dap-go'