CRAG666 / code_runner.nvim

Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
MIT License
534 stars 38 forks source link

Is it possible to add an option to modify the concat command? #103

Closed heheda123123 closed 8 months ago

heheda123123 commented 8 months ago

I use Lazyvim I changed the neovim shell to powershell

vim.o.shell = "powershell"
vim.o.shellcmdflag = "-command"
vim.o.shellquote = '"'
vim.o.shellxquote = ""

when I use default code_runner setting, it will occur error because default use && to concat each command powershell not allowed && concat two command , it can use ; instead so I use below setting

return {
  {
    "CRAG666/code_runner.nvim",
    config = true,
    keys = { { "<leader>cc", ":RunCode<cr>", desc = "RunCode" } },
    opts = {
      filetype = {
        c = { "cd $dir ;", "clang $fileName ;", "./a.exe" },
        cpp = { "cd $dir ;", "clang++ $fileName ;", "./a.exe" },
        go = { "cd $dir ;", "go mod tidy;", "go run $dir" },
      },
    },
  },
}

the above setting can work, but I should changed every language with the ; manully, Is it possible to add an option to modify the concat command? such as when I set the concat command to ;, it will work