diff --git a/after/ftplugin/ruby.lua b/after/ftplugin/ruby.lua new file mode 100644 index 0000000..5cbe469 --- /dev/null +++ b/after/ftplugin/ruby.lua @@ -0,0 +1,15 @@ +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, +-- })