Skip to content

Commit

Permalink
docs: Document the ${defaultBuildDir} variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Sep 25, 2024
1 parent 351b6a1 commit 1bbf418
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/lsp/howto/use-esbonio-with.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _lsp-use-with:

How To Use Esbonio With...
==========================

Expand Down
29 changes: 25 additions & 4 deletions docs/lsp/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,42 @@ The following options control the creation of the Sphinx application object mana
:scope: project
:type: string[]

The ``sphinx-build`` command to use when invoking the Sphinx subprocess.
The ``sphinx-build`` command ``esbonio`` should use when building your documentation, for example::

["sphinx-build", "-M", "dirhtml", "docs", "${defaultBuildDir}", "--fail-on-warning"]

This can contain any valid :external+sphinx:std:doc:`man/sphinx-build` argument however, the following arguments will be ignored and have no effect.

- ``--color``, ``-P``, ``--pdb``

Additionally, this option supports the following variables

- ``${defaultBuildDir}``: Expands to esbonio's default choice of build directory

.. esbonio:config:: esbonio.sphinx.pythonCommand
:scope: project
:type: string[]

The command to use when launching the Python interpreter for the process hosting the Sphinx application.
Use this to select the Python environment you want to use when building your documentation.
Used to select the Python environment ``esbonio`` should use when building your documentation.
This can be as simple as the full path to the Python executable in your virtual environment::

["/home/user/Projects/example/venv/bin/python"]

Or a complex command with a number of options and arguments::

["hatch", "-e", "docs", "run", "python"]

For more examples see :ref:`lsp-use-with`

.. esbonio:config:: esbonio.sphinx.cwd
:scope: project
:type: string

The working directory from which to launch the Sphinx process.
If not set, this will default to the root of the workspace folder containing the project.
If not set

- ``esbonio`` will use the directory containing the "closest" ``pyproject.toml`` file.
- If no ``pyproject.toml`` file can be found, ``esbonio`` will use workspace folder containing the project.

.. esbonio:config:: esbonio.sphinx.envPassthrough
:scope: project
Expand Down

0 comments on commit 1bbf418

Please sign in to comment.