From 1ce41eec52ecc672082edfea85d61af782badd3a Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 23 May 2024 08:06:10 -0400 Subject: [PATCH] fix(provider): only show `conform` clients if not fallingback to the LSP --- lua/astroui/status/provider.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/astroui/status/provider.lua b/lua/astroui/status/provider.lua index 8e4e0e9..b991b22 100644 --- a/lua/astroui/status/provider.lua +++ b/lua/astroui/status/provider.lua @@ -539,10 +539,10 @@ function M.lsp_client_names(opts) end end if opts.integrations.conform and package.loaded["conform"] then -- conform integration - vim.list_extend( - buf_client_names, - vim.tbl_map(function(c) return c.name end, require("conform").list_formatters(bufnr)) - ) + local conform = require "conform" + if not conform.will_fallback_lsp { bufnr = bufnr } then + vim.list_extend(buf_client_names, conform.list_formatters_for_buffer(bufnr)) + end end if opts.integrations["nvim-lint"] and package.loaded["lint"] then -- nvim-lint integration vim.list_extend(buf_client_names, require("lint")._resolve_linter_by_ft(vim.bo[bufnr].filetype))