robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

[ENHANCEMENT] Add Explicit Library Prefixing for Keywords in RobotCode

Open TeleBack3C opened this issue 11 months ago • 1 comments

Description: In Robot Framework Language Server (VS Code extension), when a keyword comes from a specific library/resource files, it is prefixed with the library name (e.g., Browser.Get Text). This makes it clearer which library a keyword belongs to, especially when multiple libraries provide similarly named keywords.

However, RobotCode does not currently provide this functionality. Instead, it always displays the keyword name without an explicit library prefix. This can make it harder to distinguish between keywords from different libraries/resource files, particularly when working with large test suites that import multiple libraries/resource files.

Proposed Enhancement:

  • Modify RobotCode’s language server to prefix keywords with their respective library/resource file names when suggesting or displaying them.
  • Ensure that this behavior aligns with Robot Framework’s default naming conventions and avoids unnecessary prefixing when a keyword is unambiguous.
  • Provide a setting to enable or disable this feature based on user preference.

Benefits:

  • Improves clarity when working with multiple libraries/resource files.
  • Reduces confusion when keywords have identical names in different libraries.

Additional Context: This feature would be particularly useful for users migrating from other language servers or those working with complex Robot Framework projects.

Thank you for considering this feature request!

TeleBack3C avatar Mar 17 '25 09:03 TeleBack3C

Hi @TeleBack3C , @d-biehl

I think many of us would appreciate this change. Following my request, I benefited from this improvement during the transition from RED to RF langage Server.

https://github.com/robocorp/robotframework-lsp/issues/794

I'm looking forward to using this feature to get started with Robot Code. Thank you very much.

emerisier avatar Nov 09 '25 23:11 emerisier