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
- Checkout this branch
- Run extension in the extension development host
- Open the file that has Code Suggestions enabled, e.g.
javascript
, notice that that Code Suggestions Status Bar displays CS enabled - Switch to the file that has CS disabled, e.g.
html
. Notce that the status bar icom display "CS disabled" - Switch between the files back and forth and make sure the icon state is updated accordingly
Web IDE
- Open
gitlab-web-ide
project cd gitlab-vscode-extension
- checkout current branch
git checkout 1402-send-only-document-uri-instead-of-full-document
- Navigate back
cd ..
- run
yarn install
- run
start:example
script - In the form check "Enable CS" and provide a valid token
- When the WebIDE is started in the command palette go to User setting and make sure to enable LS FF
"gitlab.featureFlags.languageServerWebIDE": true,
- 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