jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
196 stars 29 forks source link

Theme does not work with rST Vscode Extension #163

Closed twodrops closed 1 year ago

twodrops commented 1 year ago

I really like the immaterial theme, but it does not work with rST VsCode Extension. The problem is with the language server (Esbonio) used by the extension that it crashes with the async Google font download.

I did not find a way to turn off the font download. It would be nice, if the font download is made optional.

2bndy5 commented 1 year ago

Can you post anything that tells us why the font is causing the extension to crash?

If it is a problem with the path to the fonts not being relative to the sphinx-build output, then you can use the config option sphinx_immaterial_external_resource_cache_dir to tell the theme to download the fonts to your project's docs' build folder.

twodrops commented 1 year ago

Unfortunately the extension does not seem to write much about this problem on the console even with debug log level.

/usr/local/lib/python3.10/site-packages/esbonio/lsp/sphinx/init.py:164: RuntimeWarning: coroutine 'add_google_fonts..do_fetch' was never awaited

sphinx_immaterial_external_resource_cache_dir worked well with local build but not with the build triggered by the extension,

There is some suggestion by the Esbonio developers here https://github.com/swyddfa/esbonio/issues/451#issuecomment-1255633191

twodrops commented 1 year ago

Maybe it is notable to say that I am using a VsCode DevContainer. But most other themes work fine with this setup and Esbonio.

2bndy5 commented 1 year ago

Solution released in v0.11.4