You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of the plugin will use the active project's root directory as the working directory for the pasfmt subprocess, which means that the search for the config file will begin there.
Usually, this will be what the user wants, but there may be some scenarios for which it is not:
multiple projects are open and they format a file 'from' a project other than the active one, then the config file from the 'wrong' project will be used
a file that's not a part of the current project is formatted and an unrelated config file (from the active project) is used.
A better method might be to set the working directory to the parent directory of the file being formatted, which will allow pasfmt to search upwards and find the closest pasfmt.toml file. With this method you would need to handle the case where the active editor isn't yet saved to a file, and still pick something as the working directory.
A related topic is whether the plugin should provide a setting to explicitly override the configuration file, corresponding to the --config-file CLI option of pasfmt.
The text was updated successfully, but these errors were encountered:
The current version of the plugin will use the active project's root directory as the working directory for the
pasfmt
subprocess, which means that the search for the config file will begin there.Usually, this will be what the user wants, but there may be some scenarios for which it is not:
A better method might be to set the working directory to the parent directory of the file being formatted, which will allow
pasfmt
to search upwards and find the closestpasfmt.toml
file. With this method you would need to handle the case where the active editor isn't yet saved to a file, and still pick something as the working directory.A related topic is whether the plugin should provide a setting to explicitly override the configuration file, corresponding to the
--config-file
CLI option ofpasfmt
.The text was updated successfully, but these errors were encountered: