| 72 | * Loads and validates the user's configuration |
| 73 | */ |
| 74 | export async function loadConfiguration() { |
| 75 | const validatorResults = await configuration.load(); |
| 76 | |
| 77 | Logger.debug(`${validatorResults.numErrors} errors found with vim configuration`); |
| 78 | |
| 79 | if (validatorResults.numErrors > 0) { |
| 80 | for (const validatorResult of validatorResults.get()) { |
| 81 | switch (validatorResult.level) { |
| 82 | case 'error': |
| 83 | Logger.error(validatorResult.message); |
| 84 | break; |
| 85 | case 'warning': |
| 86 | Logger.warn(validatorResult.message); |
| 87 | break; |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * The extension's entry point |