Skip to content

Commit

Permalink
fix(noice-nvim): remove statusline progress if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Feb 13, 2024
1 parent 1b71e42 commit cca9638
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions lua/astrocommunity/utility/noice-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,27 @@ return {
},
{
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = { features = { lsp_handlers = false } },
---@param opts AstroLSPOpts
opts = function(_, opts)
local noice_opts = require("astrocore").plugin_opts "noice.nvim"
if -- check if noice handlers are disabled
vim.tbl_get(noice_opts, "lsp", "hover", "enabled") ~= false
or vim.tbl_get(noice_opts, "lsp", "signature", "enabled") ~= false
then
if not opts.features then opts.features = {} end
opts.features.lsp_handlers = false
end
end,
},
{
"heirline.nvim",
optional = true,
opts = function(_, opts)
local noice_opts = require("astrocore").plugin_opts "noice.nvim"
if vim.tbl_get(noice_opts, "lsp", "progress", "enabled") ~= false then -- check if lsp progress is enabled
opts.statusline[9] = require("astroui.status").component.lsp { lsp_progress = false }
end
end,
},
{
"folke/noice.nvim",
Expand Down

0 comments on commit cca9638

Please sign in to comment.