return {
    {
        'idris-community/idris2-nvim',
        event = { 'BufReadPre *.idr', 'BufNewFile *.idr' },
        dependencies = {
            'neovim/nvim-lspconfig',
            'MunifTanjim/nui.nvim',
            'folke/which-key.nvim'
        },
        config = function()
            local wk = require('which-key')
            local action = require('idris2.code_action')
            local hover = require('idris2.hover')
            local meta = require('idris2.metavars')
            local browse = require('idris2.browse')
            local repl = require('idris2.repl')

            require('idris2').setup({
                client = {
                    hover = {
                        use_split = false,
                        split_size = '30%',
                        auto_resize_split = false,
                        split_position = 'bottom',
                        with_history = true,
                    },
                },
                -- autostart_semantic = true,
                -- code_action_post_hook = save_hook,
                -- use_default_semantic_hl_groups = true,
                server = {
                    init_options = {
                        logFile = "~/.cache/idris2-lsp/server.log",
                        longActionTimeout = 2000,
                    },
                    on_attach = function(...)
                        wk.add({
                            { '<leader>c', action.case_split, desc = 'Split case' },

                            { '<leader>i', group = 'idris action' },
                            { '<leader>ic', action.make_case, desc = 'Make case' },
                            { '<leader>iw', action.make_with, desc = 'Make with' },
                            { '<leader>il', action.make_lemma, desc = 'Make lemma' },
                            { '<leader>ia', action.add_clause, desc = 'Add clause' },
                            { '<leader>io', action.expr_search, desc = 'Expr search' },
                            { '<leader>ig', action.generate_def, desc = 'Generate definition' },
                            { '<leader>ir', action.refine_hole, desc = 'Refine hole' },
                            { '<leader>ib', browse.browse, desc = 'Browse' },

                            { '<leader>s', group = 'idris split' },
                            { '<leader>so', hover.open_split, desc = 'Open' },
                            { '<leader>sc', hover.close_split, desc = 'Close' },

                            { '<leader>m', group = 'idris metavariables' },
                            { '<leader>mm', meta.request_all, desc = 'Request all' },
                            { '<leader>mn', meta.goto_next, desc = 'Next' },
                            { '<leader>mp', meta.goto_prev, desc = 'Previous' },

                            { '<leader>e', group = 'idris evaluate' },
                            { '<leader>ee', repl.evaluate, desc = 'Expression' },
                            {
                                '<leader>ev',
                                function() repl.evaluate({ visual = true}) end,
                                desc = 'Visual selection',
                                mode = 'v',
                                group = 'idris evaluate'
                            },
                            {
                                '<leader>er',
                                function() repl.evaluate({ visual = true, sub = true}) end,
                                desc = 'Replace selection',
                                mode = 'v'
                            },
                        })
                    end
                }
            })
        end
    }
}
