robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
173 stars 14 forks source link

[QUESTION] : Robotidy Formatter #134

Closed ultimate318ai closed 1 year ago

ultimate318ai commented 1 year ago

Please describe. Hello, I am using your extension and I am very impressed by it's quality, It helped me very much in robot framework test writing.

My question is about robotidy formatting, I wonder if there were some kind of option in order to pass a TOML file in order to get format on save on RobotFramework file, for instance, given following TOML file :

image

How does I can link this to the extension (e.g pass come kind of "robotcode.robotidy.args" : ["--config", "./config.toml"] ) to the robotidy embedded in the extension ? Hence having at least format on load/or save.

Thanks in advance

Desktop (please complete the following information):

d-biehl commented 1 year ago

No at the moment there is no such option. RobotCode uses the default behavior of robotidy by looking for a pyproject.toml file with a [tool.robotidy] section as it is described in the robotidy documentation. Maybe that is enough for you purposes.

If not, we can convert this question to a Enhancement Request?

d-biehl commented 1 year ago

robotidy looks also for a robotidy.toml file as a default configuration. This should also work with RobotCode

ultimate318ai commented 1 year ago

Adding a pyproject.toml at the root of my project does have resolved my problem. I also had to rename my [variables] section to [tool.robotidy]. Thanks for your help ! Have a nice day ;)