usse/scrape/venv/lib/python3.10/site-packages/esbonio/lsp/sphinx/directives.py

11 lines
361 B
Python
Raw Normal View History

2023-12-22 14:26:01 +00:00
import json
from esbonio.lsp.directives import Directives
from esbonio.lsp.sphinx import SphinxLanguageServer
from esbonio.lsp.util import resources
def esbonio_setup(rst: SphinxLanguageServer, directives: Directives):
sphinx_docs = resources.read_string("esbonio.lsp.sphinx", "directives.json")
directives.add_documentation(json.loads(sphinx_docs))