Skip to content

Commit f078ce8

Browse files
committed
fix(utils): fix runtime_condition check
1 parent 0cb9b6d commit f078ce8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/astroui/status/provider.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ function M.lsp_client_names(opts)
524524
for _, client in pairs((vim.lsp.get_clients or vim.lsp.get_active_clients) { bufnr = bufnr }) do
525525
if client.name == "null-ls" and opts.integrations.null_ls then
526526
local null_ls_sources = {}
527-
local ft = vim.bo.filetype
527+
local ft = vim.bo[bufnr].filetype
528528
local params =
529529
{ client_id = client.id, bufname = vim.api.nvim_buf_get_name(bufnr), bufnr = bufnr, filetype = ft, ft = ft }
530530
for _, type in ipairs { "FORMATTING", "DIAGNOSTICS" } do

lua/astroui/status/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function M.null_ls_providers(params)
167167
if runtime_condition then -- try to calculate runtime_condition with supported parameters
168168
params.source_id = vim.tbl_get(source, "generator", "source_id")
169169
local condition_calculated, condition = pcall(runtime_condition, params)
170-
if condition_calculated then source_activated = condition == true end
170+
if condition_calculated then source_activated = condition end
171171
end
172172
if source_activated then
173173
registered[method] = registered[method] or {}

0 commit comments

Comments
 (0)