feat: add "enabled supported languages" setting
Description
refactor: Remove duplicate constant
feat: add "enabled supported languages" setting
This adds a new setting called Enabled Supported Languages
. This
presents to the user as checklist of languages, which are all enabled by
default.
In reality, it is a denylist. Only languages which are unchecked have
any effect on Code Suggestions. This is true in both states of the
gitlab.featureFlags.languageServer
.
See https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp/-/issues/174 for the rationale.
Part of #1388 (closed).
Related Issues
Resolves #1388 (closed)
Local testing
- Ensure the
gitlab.aiAssistedCodeSuggestions.enabled
is enabled. - Check out the corresponding language server MR in your local language server clone.
- Connect it to your VS Code repository in your preferred way (e.g., the language server's
npm run watch -- --editor=vscode
command)
Without language server
- Ensure the
gitlab.featureFlags.languageServer
setting is disabled. - Check out this branch and start the Extension Development Host
- Open a file written in a supported language
- Observe Code Suggestions works as normal
- Visit user and/or workspace settings and disable the language
- Observe that Code Suggestions are now disabled for files written in that language
With language server
- Ensure the
gitlab.featureFlags.languageServer
setting is enabled. - Follow from step 5 above.
Screenshots (if appropriate)
Without language server | With language server |
---|---|
simplescreenrecorder-2024-07-02_16.46.29 | simplescreenrecorder-2024-07-02_17.02.00 |
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Edited by Mark Florian