owensd / swift-langsrv

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

Fix key used to lookup settings #1

Closed zachwaugh closed 7 years ago

zachwaugh commented 7 years ago

Fixes crashes due to force-unwrapping the packageName variable when processing a completion. This is never getting set because the doWorkspaceDidChangeConfiguration() method is throwing when it fails to load the toolchainPath here.

This is looking for settings at settings["swift-langsrvr"], but it appears it is being sent settings["swift"]. I didn't see anywhere else this key was defined, so I'm assuming it's supposed to match the package.json config here - https://github.com/owensd/vscode-swift/blob/master/package.json#L60

owensd commented 7 years ago

Thanks for the catch. I fixed this here: be0c56e7833cbfb78bc967311b4eab55e816a767