Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Support Sublime path placeholders in configuration #74

Open
danpalmer opened this issue Jul 10, 2021 · 0 comments
Open

Support Sublime path placeholders in configuration #74

danpalmer opened this issue Jul 10, 2021 · 0 comments

Comments

@danpalmer
Copy link

Sublime Text provides some placeholders such as project_path that can be used in configuration.

To configure Sublack currently, this must be hard-coded:

{ "black_command": "/path/to/my/venv/bin/black" }

As each project will typically have its own virtualenv, this configuration needs to be repeated in every sublime-project file.

By supporting the placeholders, the following can be done instead:

{ "black_command": "${project_path}/.venv/bin/black" }

Now any project with a .venv will work without further configuration.

These placeholders are supported by many plugins, including most of the SublimeLinter plugins, so this pattern works for flake8, isort, mypy, pylint, and others. None of these require extra project-specific configuration to make them work because of this. It would be great to get this support in Sublack for black.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant