diff --git a/CHANGELOG.md b/CHANGELOG.md index 091aa2009..00f94aac4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # **Upcoming release** -- ... +- #492, Feat: Global configuration support # Release 1.4.0 diff --git a/docs/configuration.rst b/docs/configuration.rst index 4dd019ccd..7ea49ae65 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -4,6 +4,7 @@ Rope supports the following configuration formats 1. pyproject.toml 2. config.py +3. pytool.toml pyproject.toml -------------- @@ -44,6 +45,14 @@ Additionally, you can run an executable function at startup of rope. # Do whatever you like here! +pytool.toml +----------- +If neither a config.py or a pyproject.toml is present, rope will use a pytool.toml. +It follows the exact same syntax of the pyproject.toml. + +- Mac OS X: ``~/Library/Application Support/pytool.toml.`` +- Unix: ``~/.config/pytool.toml``` or in $XDG_CONFIG_HOME, if defined +- Windows: ``C:\Users\\AppData\Local\pytool.toml`` Options diff --git a/pyproject.toml b/pyproject.toml index ab09be8d1..1d5bf4bd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ 'Topic :: Software Development', ] version = '1.4.0' -dependencies = ['pytoolconfig >= 1.2.2'] +dependencies = ['pytoolconfig[global] >= 1.2.2'] [[project.authors]] name = 'Ali Gholami Rudi' diff --git a/rope/base/prefs.py b/rope/base/prefs.py index 262b8c4ef..4fdd4aea6 100644 --- a/rope/base/prefs.py +++ b/rope/base/prefs.py @@ -281,5 +281,6 @@ def get_config(root: Folder, ropefolder: Folder) -> PyToolConfig: custom_sources=custom_sources, bases=[".ropefolder"], recursive=False, + global_config=True, ) return config