return { 'nvimdev/lspsaga.nvim', dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons', }, config = function() require('lspsaga').setup({ lightbulb = { sign = false, virtual_text = true, }, implement = { sign = false, virtual_text = true, }, floaterm = { height = 0.7, width = 0.7, }, }) local diagnostic = require('lspsaga.diagnostic') local unused = 5 vim.keymap.set('n', 'K', ':Lspsaga hover_doc', { desc = 'Display Docs' }) vim.keymap.set('n', 'R', ':Lspsaga rename', { desc = '[R]ename' }) vim.keymap.set({ 'n', 'i' }, '', 'Lspsaga code_action', { desc = 'Code Actions' }) vim.keymap.set('n', 'ca', ':Lspsaga code_action', { desc = '[C]ode [A]ctions' }) vim.keymap.set('n', 'ge', function() diagnostic:goto_next({ severity = vim.diagnostic.severity.WARN }) end, { desc = '[G]oto [E]rror' }) vim.keymap.set('n', 'gE', function() diagnostic:goto_prev({ severity = vim.diagnostic.severity.WARN }) end, { desc = '[G]oto [E]rror (prev)' }) vim.keymap.set( 'n', 'dw', 'Lspsaga show_workspace_diagnostics ++normal', { desc = '[D]iagnostics for [W]orkspace' } ) vim.keymap.set({ 'n', 't' }, '', 'Lspsaga term_toggle', { desc = '[T]erminal' }) -- TODO: use require(lspsaga.symbol.winbar).get_bar() -- and add it to lualine rather than have it at the top of the screen which is a bit annoying end, }