I’m trying to configure the robot framework formatter in Visual Studio Code. I have the Robot Framework Language Server extension installed and set as my default formatter, and the Robot: Code Formatter set to robotidy. I’m specifically trying to modify the length at which the formatter separates a long line into a new line. Using this page, SplitTooLongLine - Robotidy 4.13.0, I’m able to get it working from the command line. However, it doesn’t work if I use shift + alt + F, which is what I need. It appears that shift + alt + F is using a robot framework formatter, but doesn’t notice the settings in the configuration file I made. For example, I set SplitTooLongLine:split_on_every_arg to False in the pyproject.toml file I made, but although the command-line format command uses that setting, the shift + alt + F formatter doesn’t. Is there a was I can make the shift + alt + F formatter use that setting too, or is this impossible?
When I tried it again, running the formatter with shift + alt + F now takes the pyproject.toml configuration into account even though it didn’t before. Not sure what changed, but at least it’s working now.
1 Like