Open faceair opened 1 year ago
Go plugin for vscode has run configuration functionality. Do you use it? We could try to find relevant run configuration for the file, and run it instead of running in the plain way. What do you think?
Yes, I am currently using the launch config (launch.json) for vscode.
Now I need to manually add the path of the main package, which is a bit inconvenient. It would be great if a new configuration item could be automatically added for me when I click "run" code len.
@faceair Ok. We will think how it could be done without making the feature harder to use. Thanks again for the feedback!
@faceair I have an idea. What if you provide a comment before the main method like: // tt:run-with: [arg1, arg2, arg3]. Will it work for you? Do you need some local path there?
Hi, according to my previous description, there is no need to add specific command-line parameters in tooltitude.
Here's an example:
In most cases where command line arguments are not required, the program can be launched directly.
If my CLI program cannot be launched, I would modify the "args" parameter in launch.json manually, but usually, there's no need to modify the configuration name. When I manually add the "args" parameter and click "run code len" again, Tooltitude will find the "launch cmd/cli/main.go" configuration and launch it correctly.
Feature request:
The current behavior of the run and debug code lens is to run directly. However, in my project, it is generally necessary to add additional command-line parameters when running, and running directly will result in an error.
This feature is implemented in Goland as follows:
Therefore, I think Tooltitude can implement this feature with a similar approach. Automatically adding a launch config can help me save some trouble, and I can add command-line parameters myself.