swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
131 stars 21 forks source link

Esbonio doesn't work when conf.py not in source directory #142

Closed AkibAzmain closed 3 years ago

AkibAzmain commented 3 years ago

I'm using the Esbonio VSCode extension (version 0.5.1). It works very well. But if I move conf.py to some other place, the language server fails.

I'm using Sphinx 3.4.3 with GNU Autotools. I have a template file named conf.py.in, from which conf.py is generated by the configure script (you should be familiar be this if you compile software from source code).

I tried to find a setting with changes Sphinx arguments but found none.

Sphinx: 3.4.3 Esbonio: 0.5.1 Autoconf: 2.59

alcarney commented 3 years ago

The language server does assume that your *.rst files are in the same directory as conf.py, something that's currently hard coded into the initialisation code. I imagine a fix for this will also flush out a way to resolve #62....

Is this something you want to have a go at fixing? (#143 made it sound like you might), if so could you assign the issue to yourself so that I know to focus on something else :)

alcarney commented 3 years ago

v0.6.0 of both the Language Server and the VSCode extension was just released which will now let you override the default srcdir Sphinx is configured with. You can set the esbonio.sphinx.srcDir option to either

Hopefully that resolves your issue but feel free to reopen this if it doesn't!