Skip to content

LSP window/showDocument{external=false, takeFocus=true} does not raise the editor window #207634

@adonovan

Description

@adonovan

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.2
  • OS Version: macOS 14.3.1

Steps to Reproduce:

  1. From an LSP server, send a showDocument request with a file: URL, external=false, takeFocus=true. Do this while another window is on top of VS Code.
  2. Observe that, although VS Code opens the designated file and navigates to the correct line and column, it does not raise the window, making it potentially impossible for the user to notice that anything happened at all.

Why do I care?, you might ask. We (the maintainers of the Go LSP server) are using a web server within our LSP server to display reports in response to certain queries initiated by the editor via a Code Action. A report might be rendered documentation for the current package, for example, or a rendered CPU profile. The reports contain links to the source code, that, when clicked, cause the LSP server to send an asynchronous showDocument downcall to the editor, causing it to open the designated source location. This enables very rich interactions between the editor and the browser.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions