mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
e37cfc46b3
closes https://github.com/oxc-project/oxc-vscode/issues/180 `oxfmt` config architecture allows running a second instance of the formatter. This worker is responsible now for single file mode and files outside the current workspace. > In `oxfmt` LSP context, user want to use the server without a context of a project. They want just open a file with `code /Users/local-settings/file.json`, which we already supported with the `single_file_mode` flag. But they also expect to format such files when you have already opened a project. It will not create watchers for this manager because they would be too expensive, atm the architecture only works with the root path of the workspace. In the example of the dynamic workspace, it would watch the complete file system. This will "break" the single file mode in `oxfmt --lsp`, when a user edits the oxfmt config on the same level where an edited file is formatted. Tested it with VS Code and WSL2 (linux) and Win10 native. Beside #21654 everything works as expected 🥳