Skip to content

Commit

Permalink
lsp: 5 sec delay before switching languages
Browse files Browse the repository at this point in the history
  • Loading branch information
bummoblizard committed Oct 23, 2024
1 parent ef0c6d1 commit ae3fca3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CodeApp/Managers/MainApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ class MainApp: ObservableObject {
{
return
}
if isLanguageServiceConnected { monacoInstance.disconnectLanguageService() }
if isLanguageServiceConnected {
monacoInstance.disconnectLanguageService()
try? await Task.sleep(for: .seconds(5))
}
LanguageService.shared.candidateLanguageIdentifier =
languageServiceConfiguration.languageIdentifier
monacoInstance.connectLanguageService(
Expand Down

0 comments on commit ae3fca3

Please sign in to comment.