Package: robotcode
RobotCode - Language support for Robot Framework for Visual Studio CodeAnextensionwhich brings support forRobotFrameworktoVisual Studio Code, includingfeatureslike code completion, debugging, test explorer, refactoring and more!Quick startInstall a supported version of Python on your system(note: only Python 3.8 and above are supported)Install a supported version of RobotFramwork on your system(note: only RobotFramework 4.0 and above are supported)Install the RobotCode extension for Visual Studio Code.Open or create a robot file and start coding! 😉RequirementsPython 3.8 or aboveRobotframework 4.1 and aboveVSCode version 1.82 and aboveFeaturesWith RobotCode you can edit your code with auto-completion, code navigation, syntax checking and many more.
Here is a list of Features:Autocomplete and IntelliSenseCode NavigationDiagnostics and LintingCode FormattingRunning and DebuggingMulti-root Workspace foldersFind implementations and references of keywords, variables, libraries, resource and variable filesShow codelenses for keyword definitionsTest ExplorerRefactoringsrenaming keywords, variables, tagsAutocomplete and IntelliSenseAutocompletion for:Libraries with parametersResources,VariablesKeywords with parametersNamespacesAutocompletion supports all supported variables typeslocal variablesvariables from resource filesvariables from variables file (.py and .yaml)static and dynamiccommand line variablesbuiltin variablesCode NavigationSymbolsGoto definitions and implementationsKeywordsVariablesLibrariesResourcesFind referencesKeywordsVariablesImportsLibrariesResourcesVariablesTagsErrors and WarningsDiagnostics and LintingRobotCode analyse your code and show diagnostics for:Syntax ErrorsUnknown keywordsDuplicate keywordsMissing libraries, resource and variable importsDuplicate libraries, resource and variable imports... and many moreFor most things RobotCode uses the installed RobotFramework version to parse and analyse the code, so you get the same errors as when you run it.Get additional code analysis withRobocop. Just install it in your python environment.Code FormattingRobotCode can format your code with the internal RobotFramework robot.tidy tool (deprecated), but also withRobotidy. Just install it.Running and DebuggingRobotCode supports running and debugging of RobotFramework testcases and tasks out of the box, directly from the definition of the test or suite.In the debug console you can see all log messages of the current run and navigate to the keyword the message was written by.Multi-root Workspace foldersRobotCodes support forMulti-root Workspaces, enables loading and editing different Robotframework projects/folders with different RobotFramework/Python environments and settings at the same time or you can share the same RobotFramework/Python environment and settings for all folders in the workspace.Installed extensionsRobotCode will automatically installPython extension.Extensions installed through the marketplace are subject to theMarketplace Terms of Use.Setting up your environmentYou can alway use your local python environment, just select the correct python interpreter in Visual Studio Code.With pipenvThis is the simpliest way to create an running environment.As a prerequisite you need to installpipenvlike this:python-mpipinstallpipenvCreate your project directory (robottest is just an example)mkdirrobottestcdrobottestInstall robotframeworkpython-mpipenvinstallrobotframeworkOpen project in VSCodeSet the python interpreter to the created virtual environmentCustomizationEditor StyleYou can change some stylings for RobotFramework files in VSCode editor, independently of the current theme. (seeCustomizing a Color Theme)See the difference:BeforeAfterAs a template you can put the following code to your user settings of VSCode.Open the usersettings.jsonlike this:Ctrl+Shift+PorF1orCMD+Shift+Pand then type:Preferences: Open Settings (JSON)put this to thesettings.json"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "variable.function.keyword-call.inner.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "variable.function.keyword-call.robotframework",
            "settings": {
                //"fontStyle": "bold"
            }
        },
        {
            "scope": "string.unquoted.embeddedArgument.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "entity.name.function.testcase.name.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "entity.name.function.keyword.name.robotframework",
            "settings": {
                "fontStyle": "bold italic"
            }
        },
        {
            "scope": "variable.other.readwrite.robotframework",
            "settings": {
                //"fontStyle": "italic",
            }
        },
        {
            "scope": "keyword.control.import.robotframework",
            "settings": {
                "fontStyle": "italic"
            }
        },
        {
            "scope": "keyword.other.header.setting.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.variable.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.testcase.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.keyword.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.setting.robotframework",
            "settings": {
                "fontStyle": "bold underline"
            }
        },
        {
            "scope": "keyword.other.header.comment.robotframework",
            "settings": {
                "fontStyle": "bold italic underline"
            }
        },
        {
            "scope": "string.unquoted.escape.robotframework",
            "settings": {
                //"foreground": "#FF0000",
            }
        }
    ]
},

"editor.semanticTokenColorCustomizations": {
    "rules": {
        "*.documentation:robotframework": {
            "fontStyle": "italic",
            //"foreground": "#aaaaaa"
        }
    }
}