Skip to content

refactor: Migrate language check to the LS policy

Olena Horal-Koretska requested to merge 177-move-CS-status-check-to-the-LS into main

Description

Creates a LanguageServerPolicy that implements StatePolicy (for code suggestions state) and communicates with the LS to get updates for the CS state. For now, only the supported language check is moved to the LS

This MR should be checked together with the LS MR gitlab-org/editor-extensions/gitlab-lsp!291 (merged).

Note, that the Code Sugestions and status check should work with the LanguageServer (feature flag) enabled and disabled.

Related Issues

gitlab-org/editor-extensions/gitlab-lsp#177

How to test

Open the file that has supported language for Code Suggestions,e.g. javascript. Make sure that the status icon is enabled and code suggestions are working (unless other policies are engaged). Switch to the file with unsupported language. Make sure it is reflected in the status icon and code suggestions are not requested.

2024-05-01_00.57.17

Edited by Olena Horal-Koretska

Merge request reports