Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show code actions for the problems even when the file is not open #236364

Open
FMorschel opened this issue Dec 17, 2024 · 4 comments
Open

Show code actions for the problems even when the file is not open #236364

FMorschel opened this issue Dec 17, 2024 · 4 comments
Assignees
Labels
error-list Problems view feature-request Request for new features or functionality

Comments

@FMorschel
Copy link

FMorschel commented Dec 17, 2024

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

  • VS Code Version: 1.96.0
  • OS Version: Windows 11 Pro

Steps to Reproduce:

  1. Add a file with a "problem" and some server fixes
  2. Close that file
  3. Restart the cache for the server (close vscode and reopen)
  4. You can now have any other file opened here. If you try to right-click the problems it'll only show "Copy" options
  5. As soon as you open the file you can right-click on the "problem" and you'll see the list of fixes from the server
  6. Now you can close it and whatever (maybe cache or something?) that list will always show
20241217_123648.mp4

I've asked @DanTup (the maintainer of the Dart-Code extension - for Dart) and he said there are no requests to the server until you open that file.

Is this intended behaviour or a bug?

@sandy081 sandy081 assigned jrieken and unassigned sandy081 Dec 18, 2024
@jrieken jrieken assigned dbaeumer and unassigned jrieken Dec 18, 2024
@jrieken
Copy link
Member

jrieken commented Dec 18, 2024

and he said there are no requests to the server until you open that file.

VS Code doesn't send any requests for diagnostics but it works via push. Extensions should use the tabs api/model to manage their own strategy. Forwarding to @dbaeumer please LSP does something

@DanTup
Copy link
Contributor

DanTup commented Dec 18, 2024

VS Code doesn't send any requests for diagnostics but it works via push.

This comment referred to the codeActions request, rather than diagnostics. In the bug above, the server pushes diagnostics to VS Code, but when you hover over a diagnostic in the Problems tab, there is no request to CodeActions (to show the lightbulb menu) unless the file is open.

I'm not sure if this is intended or a bug.

I think the title of this issue would be better as "doesn't send requests for Code Actions (Fixes?) unless the file is open".

@FMorschel FMorschel changed the title Problems tab doesn't send requests for the language untill the file is opened. Problems tab doesn't send requests for Code Actions (Fixes?) unless the file is open Dec 18, 2024
@FMorschel
Copy link
Author

Thanks for the naming suggestion!

@jrieken jrieken assigned sandy081 and unassigned dbaeumer Dec 18, 2024
@sandy081 sandy081 added feature-request Request for new features or functionality error-list Problems view labels Dec 19, 2024
@sandy081 sandy081 added this to the Backlog Candidates milestone Dec 19, 2024
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@sandy081 sandy081 changed the title Problems tab doesn't send requests for Code Actions (Fixes?) unless the file is open Show code actions for the problems even when the file is not open Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-list Problems view feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants