NvChad / NvChad

Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.

Home Page:https://nvchad.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send Code to the terminal for execution

biplab37 opened this issue · comments

Is your feature request related to a problem? Please describe.
I am using Julia and want to be able to send a line or a visual block of code to the terminal where I can execute the code. Is there a way to do it with the default term in nvchad?

map("n", "<C-l>", function () require("nvchad.term").runner {
    pos = "sp",
    cmd = vim.fn.getreg('"'),
    id = "ekk",
    clear_cmd = false
  } end)

This example maps executing code from " register, so you can yank and run with <C-l>
Code mostly from here https://nvchad.com/docs/config/nvchad_ui
But for some reason, i cant run multiple lines