Skip to content

Commit cafc464

Browse files
authored
feat: make oxfmt support oxfmt.config.ts files (#4372)
1 parent 8e2084b commit cafc464

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lsp/oxfmt.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ return {
4848

4949
-- Oxfmt resolves configuration by walking upward and using the nearest config file
5050
-- to the file being processed. We therefore compute the root directory by locating
51-
-- the closest `.oxfmtrc.json` / `.oxfmtrc.jsonc` (or `package.json` fallback) above the buffer.
52-
local root_markers = util.insert_package_json({ '.oxfmtrc.json', '.oxfmtrc.jsonc' }, 'oxfmt', fname)
51+
-- the closest `.oxfmtrc.json` / `.oxfmtrc.jsonc` / `oxfmt.config.ts` (or `package.json` fallback) above the buffer.
52+
local root_markers =
53+
util.insert_package_json({ '.oxfmtrc.json', '.oxfmtrc.jsonc', 'oxfmt.config.ts' }, 'oxfmt', fname)
5354
on_dir(vim.fs.dirname(vim.fs.find(root_markers, { path = fname, upward = true })[1]))
5455
end,
5556
}

0 commit comments

Comments
 (0)