Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce configuration variables #847

Merged
merged 5 commits into from
Jul 7, 2024

Conversation

alcarney
Copy link
Member

@alcarney alcarney commented Jul 7, 2024

Configuration objects can now accept variables of the form
${variable} and have them expanded by the configuration system at
runtime.

This commit adds support for the following variables

  • ${scope}: The full uri of the scope at which the configuration
    object was requested

  • ${scopePath}: The path component of the scope uri

  • ${scopeFsPath}: The path component of the scope uri as a
    filesystem path

Currently these configuration variables will only be expanded if they
appear in a field that is a simple string.

Additionaly, this commit sets the default value for SphinxConfig.cwd
to be ${scopeFsPath}. This should mean that any
esbonio.sphinx.buildCommand values in a pyproject.toml file will
be evaluated relative to the file's location. Closes #711

alcarney added 2 commits June 30, 2024 13:09
This seems to fix an issue that prevents Sphinx from running inside a devcontainer
nektos/act#1853
Taking advantage of workspace local extensions, this adds a make target that will symlink the
`code/` directory to `.vscode/extensions/esbonio` allowing it to be installed.
It would be nice if there was a cli `code` command that would do the final step though....
alcarney added 3 commits July 7, 2024 11:16
Configuration objects can now accept variables of the form `${variable}`
and have them expanded by the configuration system at runtime.

This commit adds support for the following variables

- `${scope}`: The full uri of the scope at which the configuration
  object was requested

- `${scopePath}`: The path component of the scope uri

- `${scopeFsPath}`: The path component of the scope uri as a
  filesystem path

Currently these configuration variables will only be expanded if they
appear in a field that is a simple string.

Additionaly, this commit sets the default value for `SphinxConfig.cwd`
to be `${scopeFsPath}`. This should mean that any
`esbonio.sphinx.buildCommand` values in a `pyproject.toml` file will
be evaluated relative to the file's location. Closes swyddfa#711
@alcarney alcarney merged commit 578d9e5 into swyddfa:develop Jul 7, 2024
13 of 14 checks passed
@alcarney alcarney deleted the file-config-cwd branch July 7, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server should resolve file based config relative to file's location
1 participant