robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
201 stars 88 forks source link

Code completion for enum arguments #108

Open fabioz opened 4 years ago

fabioz commented 4 years ago

This can only be done when the issues below are also tackled:

https://github.com/robocorp/robotframework-lsp/issues/107 https://github.com/robotframework/robotframework/issues/3607

mkorpela commented 4 years ago

As a background: Enum completion is available in Robot Framework see User Guide : Supported Conversions. This is a powerful feature from library usage perspective: We can now explicitly limit the parameter values to a known set (Enum values). Robot Framework will automatically fail the test if a wrong parameter value is given.

What would be very useful now is that these parameter values could also be autocompleted as the same type and Enum information should be also available for the LSP based editor plugin.

mkorpela commented 4 years ago

Conversions also reveal type information that could be validated by the editor plugin. For instance date or number.