swyddfa / esbonio

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

Refactor directives #814

Closed alcarney closed 1 month ago

alcarney commented 1 month ago

Rather than try and have a single Directives language feature that does all the work of discovering directives, suggesting completions AND making it all work for both rst and myst, this commit breaks the work up between multiple LanguageFeatures.

There is a backend Directives feature, that will provide an API that the various frontend features can use.

Then there is the RstDirectives and MystDirectives features that build on the backend to surface the relevant features for their respective syntax. At the moment they are nearly identical however, they are now free to diverge to better support their associated syntax

This PR also makes some improvements to the Makefiles