refactor: Move supported language check to the state policy
Moves supported language check to the StatePolicy
- similar to other Code Suggestions policies.
This refactoring is done in preparation for #1318 (closed)
References gitlab-org/editor-extensions/gitlab-lsp#177 (closed)
How to test
Open the file that has supported language for Code Suggestions,e.g. javascript
. Make sure that the status icon is enabled an 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 are code suggestions are not requested.
Edited by Olena Horal-Koretska