Commit Graph

2 Commits

Author SHA1 Message Date
leaysgur eabfe016cf feat(oxfmt/lsp): support oxc.fmt.disableNestedConfig (#24965)
Refs: voidzero-dev/vite-plus#2245

(I had assumed Oxlint didn't have an option for LSP either, but that wasn't the case.)
2026-07-27 01:32:09 +00:00
leaysgur 952de064df feat(oxfmt/lsp): Support per-directory config (#21081)
A.k.a. nested config, for LSP.

I plan to add CLI support later, LSP support for start.
(So, please do not merge for a while. 🙏🏻)

- Before: At startup, it finds-up for config file starting from the workspace root
  - It followed the same behavior as the CLI
- After: When a formatting request is made, it finds-up for a config file starting from the target file and then caches
  - Unlike Oxlint, Oxfmt does not have the concept of a root config, so this approach is sufficient
  - In the first place, I don't see any reason to parse a config file when you don't even know if it's going to be used
- Unchanged:
  - It still resolves a single `.prettierignore` and `.editorconfig` as before
  - When `configPath` is specified, it uses only that config file
  - For in-memory file, it is resolved by workspace root
2026-04-15 01:26:49 +00:00