IntelliSense won't work for resource files and custom libraries

Hi all,
I am trying to get the most out of the VS Code Robot Framework Language Server extension but I seem to fail to set it up correctly. My problem is that robotframework can’t seem to find my resource and library files (Undefined keyword).
My folder structure is as follows:
image

I have followed the instructions here and set my python.pythonPath to my Anaconda environment. robot.language-server.python is pointing to that path too. Now I have tried to set the following to my robot.pythonpath:
“\libraries”,
“\resources”,
“{workspaceFolder}\resources”,
“{workspaceFolder}\libraries”
But as you can see from my screenshot IntelliSense can not seem to find my resources. I am on Windows 10. I’m thankful for any advice.

I believe the issue is that the paths must be full paths in the filesystem.

Actually, I think that right now the easiest way to configure things would be using both Robot Framework Language Server as well as Robocorp Code, then, create a robot.yaml at the root of your folder (https://robocorp.com/docs/setup/robot-yaml-format) and define the relative paths to the PYTHONPATH entry there (with both extensions installed Robocorp Code should automatically use the proper PYTHONPATH).

As a note, you can use the Robocorp: Create Robot action (with the minimal template) to get the initial contents for the robot.yaml and the conda.yaml.

Still, if you’d like to use just the Robot Framework Language Server and you still can’t make it work, please create a ticket at: https://github.com/robocorp/robotframework-lsp with details on your setup and the actual contents of your settings.json.

2 Likes

Note: Robocorp Code is another VSCode extension (https://marketplace.visualstudio.com/items?itemName=robocorp.robocorp-code) to help in creating Robots that can also run in the Robocorp Cloud.