Skip to content

refactor: always update on LS state changes

Mark Florian requested to merge 1430-fix-ls-state-bug into main

Description

refactor: always update on LS state changes

This ensures that if the language server sends consecutive $/gitlab/codeSuggestions/stateChange notifications with different but truthy values, we update the UI accordingly.

Related Issues

Part of #1430 (closed).

How has this been tested?

  1. Check out gitlab-org/editor-extensions/gitlab-lsp!632 (merged) (caveat: I'm still tidying that MR up, and it might not be in a runnable state when you get to this. If that's the case, hopefully you see the intrinsic value of this change. If not, wait for that MR to be ready!)
  2. Link your local language server repository to your local VS Code extension repository.
  3. Disable Code Suggestions for a supported langage.
  4. Open a file in that language in one tab.
  5. Open a file written in an unsupported language in another tab.
  6. Switch between the tabs, and observe that the status bar item's tooltip correctly alternates between "disabled" and "unsupported" messages.

Screenshots (if appropriate)

See !1807 (merged). For those videos, the language server was actually disabled, but the substance of what they show applies here as well.

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 - Note: this isn't fixing a user facing bug in production, yet, as gitlab-org/editor-extensions/gitlab-lsp!632 (merged) would need to be merged first (and the dependency bumped accordingly).
Edited by Mark Florian

Merge request reports

Loading