local M = {} local cmd_pcall = function (string) local success, msg = pcall(function() vim.cmd(string) end) if not success then msg = string.match(tostring(msg), "E%d+.*") vim.api.nvim_err_writeln(msg) end end vim.keymap.set('n', 'gf', function() cmd_pcall(':e ') end, {noremap = true}) vim.keymap.set('n', "q", function() vim.cmd(':botright cope') end) vim.keymap.set('n', "l", function() cmd_pcall(':aboveleft lope') end) vim.keymap.set('n', "dk", function () vim.diagnostic.open_float() end) vim.keymap.set('n',"k", function() vim.cmd("make") end) vim.keymap.set('t', "", "") return M