local map = LazyVim.safe_keymap_set -- map("n", "x", ":lua RunInTerminal('ruby ' .. vim.fn.expand('%'), true)", { buffer = true }) print("haa") map("n", "x", function() print("Running ruby file") -- RunInTerminal("ruby " .. vim.fn.expand('%'), true) end, { desc = "Execute ruby file", buffer = true }) -- vim.cmd([[ -- autocmd FileType ruby nnoremap cs :lua RunRubocop() -- ]]) -- -- vim.cmd([[ -- autocmd FileType ruby nnoremap x :lua RunInTerminal("ruby " .. vim.fn.expand('%'), true) -- ]]) -- Maybe this -- vim.api.nvim_create_autocmd("FileType", { -- pattern = "ruby", -- callback = function() -- map("n", "x", ":lua RunInTerminal('ruby ' .. vim.fn.expand('%'), true)", { buffer = true }) -- end, -- })