feat: Make OxcFixAllAction work when triggered from project view#177
feat: Make OxcFixAllAction work when triggered from project view#177nrayburn-tech merged 4 commits intooxc-project:mainfrom InSyncWithFoo:main
OxcFixAllAction work when triggered from project view#177Conversation
src/main/kotlin/com/github/oxc/project/oxcintellijplugin/actions/OxcFixAllAction.kt
Outdated
Show resolved
Hide resolved
|
Thanks for the PR. There is a custom workspace command that I think should probably be used here instead of this approach, but I'm not entirely sure. @Sysix we have a scenario where we want to apply the fixes to a file that is not opened within the editor. We do this by right clicking the file name and triggering an action on it. Does the |
|
The command expects that the file is still open. The server could lint them from file system, but is just skipping it currently:
I expect every approach will suffer from this problem. Here the same problem with code actions: |
…iles (#10815) Related oxc-project/oxc-intellij-plugin#177 When the client request code actions or commands for a file. This file must not be open to be requested. In the main, we are just looking into our `diagnostics_map`, which will be filled only on open/change/close of the text document. When the client request now a code action or command for a file, we will lint them only (if not already done) and avoid filling the `diagnostic_map`.
|
This will only work once oxc-project/oxc#10815 is released. Once there's a version of Oxlint out that supports that, this can be merged and released. |
|
Oh, 0.16.10 is out with that PR already. I'll merge this in and release a version sometime this weekend. |
…iles (#10815) Related oxc-project/oxc-intellij-plugin#177 When the client request code actions or commands for a file. This file must not be open to be requested. In the main, we are just looking into our `diagnostics_map`, which will be filled only on open/change/close of the text document. When the client request now a code action or command for a file, we will lint them only (if not already done) and avoid filling the `diagnostic_map`.
Resolves #170 and reverts #173.
I haven't tested it, but it should work.