This PR refactors part of vscode.ts and adds a function to get the NLS Configuration. This makes the code more readable and easier to test. And it adds multiple tests for this part of the codebase.