swyddfa / esbonio

A language server for working with Sphinx projects.

Home Page:https://docs.esbon.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "build all" command to VSCode extension

opened this issue · comments

A would like to see a "build all" command in the VSCode extension.

This is really helpfull when editing a toctree directive. The toctree isn't automatically updated on other pages, only when saving them again. So each and every page must be saved to inherit the updated toctree.

I don't know if I am missing something, but I have pinned the command to restart the language server, so it is only a click away. I use it often. I have a large website to build, but rebuild all by restarting the language server is really fast and waiting is zero issue for me.

Maybe I'm missing something too, but in my case, the table of contents in the sidebar isn't updated, even when I restart the language server. I'm using the sphinx-book-theme.

the table of contents in the sidebar isn't updated, even when I restart the language server

Sounds like Sphinx's caching is getting in the way.

Currently there is an esbonio.sphinx.forceFullBuild option you can try that should force Sphinx to build everything when the server restarts.

But a command that only triggers a full build sounds like a good idea :)

Currently there is an esbonio.sphinx.forceFullBuild option you can try that should force Sphinx to build everything when the server restarts.

Thanks for pointing out the option, I must have overlooked it. Restarting the language server now updates the sidebar TOC as it should.

But a command that only triggers a full build sounds like a good idea :)

I'm glad to hear that!

in my case, the table of contents in the sidebar isn't updated, even when I restart the language server.

When you delete the Sphinx/Esbonio build folder before restarting the language server, the complete website is rebuilt, but you will need to close and reopen the Esbonio previewer when the language server is finished rebuilding.

I use the Esbonio setting "esbonio.sphinx.buildDir": "${workspaceFolder}/_build/html" to have the build dir (_build/html) at the top level of my VSCode workspace, for easy access.

As well as a "build all" command, there should be the option to clear the build folder and start from scratch

See: #609 (comment)