Skip to content

fix: Send URI instead of document in `DidChangeDocumentInActiveEditor`

Description

Sending the full document from the LSP client to the LSP server causes an issue in WebIDE. This MR changes the behavior to send only document URI on vscode.window.onDidChangeActiveTextEditor in the custom DidChangeDocumentInActiveEditor notification payload.

This MR can be merged only after this update gitlab-org/editor-extensions/gitlab-lsp!617 (merged) on the LS side is merged and released

Related Issues

Resolves #1402 (closed)

How has this been tested?

Desktop extension steps

  1. Checkout this branch
  2. Run extension in the extension development host
  3. Open the file that has Code Suggestions enabled, e.g. javascript, notice that that Code Suggestions Status Bar displays CS enabled
  4. Switch to the file that has CS disabled, e.g. html. Notce that the status bar icom display "CS disabled"
  5. Switch between the files back and forth and make sure the icon state is updated accordingly

Web IDE

  1. Open gitlab-web-ide project
  2. cd gitlab-vscode-extension
  3. checkout current branch git checkout 1402-send-only-document-uri-instead-of-full-document
  4. Navigate back cd ..
  5. run yarn install
  6. run start:example script
  7. In the form check "Enable CS" and provide a valid token
  8. When the WebIDE is started in the command palette go to User setting and make sure to enable LS FF "gitlab.featureFlags.languageServerWebIDE": true,
  9. Start from "step 3" in the "Desktop extension steps"

Screenshots (if appropriate)

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

Closes #1402 (closed)

Edited by Olena Horal-Koretska

Merge request reports

Loading