grain-language-server icon indicating copy to clipboard operation
grain-language-server copied to clipboard

feat(vscode): Add run button

Open spotandjake opened this issue 1 year ago • 3 comments

This pr adds a run current file button with a corresponding configuration and command. Screenshot 2024-10-24 at 3 00 31 PM It currently uses the runCommandLayout configuration to build a pattern and then opens the terminal with the run command when pressed.

Closes: #167

spotandjake avatar Oct 24 '24 19:10 spotandjake

I feel like if we add this it needs to be configurable in some way. There's a lot of cases where it's handy to just run a file (especially for tests), but if you're targeting anything other than the command line this button will just result in an error.

I'm not super against just merging it as-is, but curious to what your thoughts are.

ospencer avatar Nov 21 '24 16:11 ospencer

In general I 100% agree with you however I think that is probably in the scope of silo and something that will be configured in your silo.toml file once it exists, for now I just made the run button open the default run command in your terminal, the user can edit it if they want and just press enter to run the program. Letting silo handle this will also make it less editor specific reducing work when supporting us editors.

spotandjake avatar Nov 21 '24 16:11 spotandjake

Sure. I do think though that the run button should just run the code, it shouldn't give me a command.

ospencer avatar Nov 21 '24 16:11 ospencer