Return the path to the global config file, if the platform's config directory can be determined. On Linux this is typically `$XDG_CONFIG_HOME/phpantom/.phpantom.toml` (defaulting to `~/.config/phpantom_lsp/.phpantom.toml`).
()
| 409 | /// On Linux this is typically `$XDG_CONFIG_HOME/phpantom/.phpantom.toml` |
| 410 | /// (defaulting to `~/.config/phpantom_lsp/.phpantom.toml`). |
| 411 | pub fn global_config_path() -> Option<PathBuf> { |
| 412 | etcetera::choose_base_strategy() |
| 413 | .ok() |
| 414 | .map(|s| s.config_dir().join(CONFIG_APP_DIR).join(CONFIG_FILE_NAME)) |
| 415 | } |
| 416 | |
| 417 | /// Create a default `.phpantom.toml` in the given workspace root. |
| 418 | /// |