owensd / swift-langsrv

The language service implementation for VS Code.
MIT License
16 stars 4 forks source link

Configure the workspace on initialize request not only on DidChangeConfiguration #5

Closed Liquidsoul closed 6 years ago

Liquidsoul commented 7 years ago

This prevents a crash when trying to invoke the Sourcery wrapper with unset implicitely unwrapped optional attributes. I've had the issue with a LSP client which was not calling this event (FYI lsp-mode for emacs). There is no absolute need to wait for the DidChangeConfiguration event to parse the Package.swift so this is now done on initialize but it will still be done if the workspace configuration changes.