aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikoloz Buligini <nbuligini11@gmail.com>2026-04-03 16:54:59 +0200
committerGitHub <noreply@github.com>2026-04-03 10:54:59 -0400
commitcafc464e14e6affb61b9f97cbb4db2530c06393b (patch)
treee141ad242310b9434c7ca24588cd95e1896def59
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar.gz
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar.bz2
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar.lz
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar.xz
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.tar.zst
nvim-lspconfig-cafc464e14e6affb61b9f97cbb4db2530c06393b.zip
feat: make oxfmt support oxfmt.config.ts files (#4372)
-rw-r--r--lsp/oxfmt.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lsp/oxfmt.lua b/lsp/oxfmt.lua
index 9e560b36..b80b755b 100644
--- a/lsp/oxfmt.lua
+++ b/lsp/oxfmt.lua
@@ -48,8 +48,9 @@ return {
-- Oxfmt resolves configuration by walking upward and using the nearest config file
-- to the file being processed. We therefore compute the root directory by locating
- -- the closest `.oxfmtrc.json` / `.oxfmtrc.jsonc` (or `package.json` fallback) above the buffer.
- local root_markers = util.insert_package_json({ '.oxfmtrc.json', '.oxfmtrc.jsonc' }, 'oxfmt', fname)
+ -- the closest `.oxfmtrc.json` / `.oxfmtrc.jsonc` / `oxfmt.config.ts` (or `package.json` fallback) above the buffer.
+ local root_markers =
+ util.insert_package_json({ '.oxfmtrc.json', '.oxfmtrc.jsonc', 'oxfmt.config.ts' }, 'oxfmt', fname)
on_dir(vim.fs.dirname(vim.fs.find(root_markers, { path = fname, upward = true })[1]))
end,
}