paths method
The config file locations and whether each exists.
Implementation
Future<List<ConfigPathInfo>> paths() async {
Future<ConfigPathInfo> entry(String label, String path) async =>
ConfigPathInfo(label, path, await _exists(path));
return [
if (homeDir != null)
await entry('global config', '$homeDir/.fah/config.yaml')
else
const ConfigPathInfo(
'global config',
'~/.fah/config.yaml (no home directory on this host)',
false,
),
await entry('project config', projectConfigPath),
await entry('project rules', '${env.cwd}/.fah/rules.yaml'),
await entry('project lsp', '${env.cwd}/.fah/lsp.json'),
await entry('project packages', '${env.cwd}/.fah/packages.yaml'),
if (homeDir != null)
await entry('dap config', '$homeDir/.dap/config.json'),
];
}