Skip to content

Commit

Permalink
Surround notify with vim.schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias-Graf committed Sep 30, 2024
1 parent 33cb857 commit 06ce787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/cspell/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ M.get_cspell_config = function(params, cspell_json_path)
local ok, cspell_config = pcall(decode_json, content)

if not ok then
vim.notify("\nCannot parse cspell json file as JSON.\n", vim.log.levels.ERROR, { title = "cspell.nvim" })
vim.schedule(function()
vim.notify("\nCannot parse cspell json file as JSON.\n", vim.log.levels.ERROR, { title = "cspell.nvim" })
end)
return
end

Expand Down

0 comments on commit 06ce787

Please sign in to comment.