Skip to content

Commit

Permalink
only tick ls when in main module
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Sep 17, 2024
1 parent c00d606 commit 3a204aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nimlangserver.nim
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ proc main*(cmdLineParams: CommandLineParams): LanguageServer =

result.srv.registerRoutes(result)
result.registerProcMonitor()
asyncSpawn tickLs(result)

when isMainModule:
try:
let ls = main(handleParams())
ls.tickLs(result)

when defined(posix):
onSignal(SIGINT, SIGTERM, SIGHUP, SIGQUIT, SIGPIPE):
debug "Terminated via signal", sig
Expand Down

0 comments on commit 3a204aa

Please sign in to comment.