Add "LanguageServer" feature flag to Web IDE

MR: feat: add languageServerWebIDE feature flag to ... (!388 - merged)

Description

Right now there's a feature flag in the VSCode project for managing the availability of the Language Server in the Web IDE (see relevant code).

We want to control this from the Web IDE feature flags (see relevant code)

Acceptance Criteria

  • Feature flag LanguageServer is added to packages/web-ide-types/src/features.
  • If this feature flag is set to true in the WebIdeConfig then the built-in GitLab Workflow extension will use the language server for code suggestions.
  • Update Web IDE example app to enable the new feature flag by default.

Implementation plan

The simplest approach to control the Language Server enablement status from the Web IDE is by setting the gitlab.featureFlags.languageServerWebIDE user configuration in the getConfigurationDefaults function. The value of this configuration will be equal to the LanguageServer Web IDE feature flag.

This approach won't work if gitlab.featureFlags.languageServerWebIDE is not defined in the GitLab Workflow Extension's package.json as a configuration contribution. Therefore, we need to deliver Register `gitlab.featureFlags.languageServerWeb... (gitlab-vscode-extension#1517 - closed) before we can define a feature flag in the Web IDE.

How to test if the Language Server is enabled in the Web IDE?

There are two indicators to identify if the Language Server is enabled in the Web IDE:

  • Code suggestions' streaming mode works in the Web IDE.
  • You can see the Language Server's logs in the logs panel.

The following video demonstrates the indicators in the Web IDE:

language_server_is_enabled.mov

Edited by Cindy Halim