0

I'm using neovim with coc extension. I add the robotframework_ls server for lsp.

My project is stored in the following directory: /home/jchabrol/personaltools/robot with the following tree: keywords (with all .resource keywords) tests (with all .robot test file)

My coc-settings.json is like this:

{
  "languageserver": {
    "robotframework_ls": {
        "command": "robotframework_ls",
        "filetypes": ["robot"],
        "settings": {
          "robot.lint.robocop.enabled":true,
          "robot.pythonpath":["~/robot",
            "${workspaceFolder}/robot"
          ]
        }
    }
  }
}

When I open a test .robot file the coc or lsp server didn't find local keyworkenter image description here

or

enter image description here

I try different configuration without any results.

0

1 Answer 1

0

The draft guess is that there is an issue with path importing for resource if you use relative paths.

The relative path to the resource file is relative to the test location.
Then, your relative-style import path could look like

Resource   ../../keywords/my_simulator.resource

Where:

  • The ../../ part is the path 'up' from a test to the project root. E.g., if the test is located in tests\folder\tests.robot
  • keywords/my_simulator.resource is the path down from the project root to the resource file.

Here is more information in the official User Guide: 2.8.1 Resource files

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.