Generate settings.json.
(self, vscode_dir: str)
| 215 | json.dump(launch, f, indent=4) |
| 216 | |
| 217 | def _generate_settings(self, vscode_dir: str) -> None: |
| 218 | """Generate settings.json.""" |
| 219 | settings = { |
| 220 | "files.associations": { |
| 221 | "*.h": "c", |
| 222 | "*.c": "c", |
| 223 | "*.cpp": "cpp", |
| 224 | "*.cc": "cpp", |
| 225 | "*.cxx": "cpp" |
| 226 | }, |
| 227 | "C_Cpp.errorSquiggles": "Enabled" |
| 228 | } |
| 229 | |
| 230 | output_path = os.path.join(vscode_dir, 'settings.json') |
| 231 | with open(output_path, 'w') as f: |
| 232 | json.dump(settings, f, indent=4) |
| 233 | |
| 234 | |
| 235 | class CMakeGenerator(ProjectGenerator): |