The language server extension is defaulting to using "didOpen" events to request code files that were not actually opened. #2426
Unanswered
Dongyang0810
asked this question in
Extension Development QnA
Replies: 1 comment
-
I'm not an expert in this, but I think this issue happens because VSCode restores previously opened files, even if they appear closed. The LSP server receives In {
"workbench.editor.restoreWhenOpening": "none"
} You can also check to see if the file was reopened from within your extension:
Finally - you can also check if a file was reopened by using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing a static code analysis extension using the Language Server Protocol. When I start a VSCode window to test the static code analysis extension, even though no code files are opened in the VSCode debugging window, the LSP language server still receives a "didOpen" request containing the file URL of some code file that was opened during a previous debugging session.
How to solve this problem: I hope that when opening a VSCode window, if no file is actually open, the "didOpen" event for previously closed files in VSCode will not be sent.
Beta Was this translation helpful? Give feedback.
All reactions