jellydn / quick-code-runner.nvim

A simple and efficient code runner for Neovim.
MIT License
22 stars 0 forks source link

Feature Request: Allow config to define filetypes #35

Open al1-ce opened 4 months ago

al1-ce commented 4 months ago

To allow running custom languages

Also possible cmd insertions (i.e ${TMP} in C's cmd?

Example:

opts = {
    file_types = {
        d = {
            cmd = "dub run --single",
            extensions = { "d" }
        },
        c = {
            cmd = "gcc ${TMP} -o ${TMP}_output; ./${TMP}_output",
            extensions = { "c", "h" }
        }
    }
}
al1-ce commented 4 months ago

I'm not really sure what's the error there though, which is why I'm making this issue...

quick-code-runner: command failed with error:     Starting Performing "debug" build using /usr/bin/dmd for x86_64.
    Building test ~master: building configuration [application]
Error: unrecognized file extension nil
Error /usr/bin/dmd failed with exit code 1.