local M = {} M.dap = { plugin = true, n = { ["db"] = { " DapToggleBreakpoint " }, ["dus"] = { function () local widgets = require('dap.ui.widgets'); local sidebar = widgets.sidebar(widgets.scopes); sidebar.open(); end, "Open debugging sidebar" } } } M.crates = { plugin = true, n = { ["rcu"] = { function () require('crates').upgrade_all_crates() end, "update crates" } } } -- Function to show diagnostics on hover vim.api.nvim_create_autocmd("CursorHold", { callback = function() local opts = { focusable = false, close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" }, border = 'rounded', source = 'always', -- show source in diagnostics popup window prefix = ' ', scope = 'cursor', } vim.diagnostic.open_float(nil, opts) end }) -- Optional: keybinding to manually show diagnostics on hover vim.api.nvim_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', { noremap = true, silent = true }) require("custom.language_specific_commands.matlab") return M