From d148e1ab5844eb0b9efa09f77772feb20cd4b660 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Oct 2022 15:12:00 +0200 Subject: [PATCH] fix: disable vim-sleuth for Noice buffers --- lua/noice/health.lua | 4 ---- lua/noice/util/hacks.lua | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/noice/health.lua b/lua/noice/health.lua index 9bf55de..12cbd55 100644 --- a/lua/noice/health.lua +++ b/lua/noice/health.lua @@ -120,10 +120,6 @@ function M.check(opts) end if Config.is_running() then - if vim.g.loaded_sleuth == 1 then - log.warn("`vim-sleuth` is known to cause issues with the Noice popupmenu.") - end - ---@type {opt:string[], opt_str?:string, handler:fun(), handler_str:string} local checks = { { diff --git a/lua/noice/util/hacks.lua b/lua/noice/util/hacks.lua index d842073..a55bd89 100644 --- a/lua/noice/util/hacks.lua +++ b/lua/noice/util/hacks.lua @@ -24,6 +24,10 @@ function M.enable() M.fix_cmp() end +function M.fix_vim_sleuth() + vim.g.sleuth_noice_heuristics = 0 +end + function M.disable() M.reset_augroup() for _, fn in pairs(M._disable) do