The closest I could get was to use - vim.diagnostic.enable(false); which works, but disables linters as well.
vim.diagnostic.enable(false)