File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ Hls.load_hls_settings = function(project_root, opts)
94
94
if not success then
95
95
local msg = ' Could not decode ' .. settings_json .. ' . Falling back to default settings.'
96
96
log .warn { msg , error }
97
- vim .notify (' haskell-tools.lsp: ' .. msg , vim .log .levels .WARN )
97
+ vim .schedule (function ()
98
+ vim .notify (' haskell-tools.lsp: ' .. msg , vim .log .levels .WARN )
99
+ end )
98
100
return default_settings
99
101
end
100
102
log .debug { ' hls settings' , settings }
@@ -139,7 +141,9 @@ Hls.start = function(bufnr)
139
141
if not ok then
140
142
--- @cast err string
141
143
log .error { ' on_attach failed' , err }
142
- vim .notify (' haskell-tools.lsp: Error in hls.on_attach: ' .. err )
144
+ vim .schedule (function ()
145
+ vim .notify (' haskell-tools.lsp: Error in hls.on_attach: ' .. err )
146
+ end )
143
147
end
144
148
local function buf_refresh_codeLens ()
145
149
vim .schedule (function ()
@@ -210,7 +214,9 @@ Hls.restart = function(bufnr)
210
214
timer :stop ()
211
215
attempts_to_live = 0
212
216
elseif attempts_to_live <= 0 then
217
+ vim .schedule (function ()
213
218
vim .notify (' haslell-tools.lsp: Could not restart all LSP clients.' , vim .log .levels .ERROR )
219
+ end )
214
220
timer :stop ()
215
221
attempts_to_live = 0
216
222
end
You can’t perform that action at this time.
0 commit comments