1234567891011 |
- vim.keymap.set('n', '<Leader>r', '<Plug>(Luadev-Run)', opts)
- vim.keymap.set('v', '<Leader>r', '<Plug>(Luadev-Run)', opts)
- vim.defer_fn(function()
- -- set buffer to lua
- vim.bo.filetype = 'lua'
- vim.fn.append(0, '-- <Leader>r to run a block of code')
- vim.fn.append(1, 'print("hello")')
- -- open output console
- vim.cmd('Luadev')
- end, 100)
|