sphinx-lua-ls 3.0.0__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sphinx_lua_ls-3.2.0/.github/dependabot.yml +21 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/.github/workflows/ci.yaml +1 -33
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/CHANGELOG.md +27 -1
- sphinx_lua_ls-3.2.0/PKG-INFO +74 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/index.rst +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/installation.rst +35 -20
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/quickstart.rst +80 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/roles.rst +1 -2
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/settings.rst +12 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/pyproject.toml +17 -18
- sphinx_lua_ls-3.2.0/sphinx_lua_ls/__init__.py +217 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/_version.py +16 -3
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/autodoc.py +11 -15
- sphinx_lua_ls-3.2.0/sphinx_lua_ls/config.py +302 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/domain.py +81 -52
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/inherited.py +2 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/intersphinx.py +10 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/lua_ls.py +11 -0
- sphinx_lua_ls-3.2.0/sphinx_lua_ls/pygments.py +21 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/utils.py +33 -19
- sphinx_lua_ls-3.2.0/sphinx_lua_ls.egg-info/PKG-INFO +74 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls.egg-info/SOURCES.txt +3 -0
- sphinx_lua_ls-3.2.0/sphinx_lua_ls.egg-info/requires.txt +26 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/directives.rst +5 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-global_tables.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-globals.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-member_ordering.html +8 -8
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-nesting.html +10 -10
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-nesting_recursive.html +24 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-object_types.html +53 -59
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-relative_resolve.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-require.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-signatures.html +23 -23
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-globals.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-member_ordering.html +8 -8
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-nesting.html +10 -10
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-nesting_recursive.html +24 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-object_types.html +56 -56
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-relative_resolve.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-autoindex.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-directives.html +476 -56
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-inherited.html +3 -3
- sphinx_lua_ls-3.0.0/PKG-INFO +0 -96
- sphinx_lua_ls-3.0.0/sphinx_lua_ls/__init__.py +0 -426
- sphinx_lua_ls-3.0.0/sphinx_lua_ls.egg-info/PKG-INFO +0 -96
- sphinx_lua_ls-3.0.0/sphinx_lua_ls.egg-info/requires.txt +0 -26
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/.gitignore +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/.pre-commit-config.yaml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/CONTRIBUTING.md +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/LICENSE +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/README.md +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/conftest.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/example/.emmyrc.json +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/example/logging.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/_extra/robots.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/apidoc.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/autodoc.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/directives.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/docs/source/example.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/setup.cfg +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/apidoc.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/autoindex.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/objtree.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/py.typed +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls/static/lua.css +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls.egg-info/dependency_links.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/sphinx_lua_ls.egg-info/top_level.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/conftest.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/.gitignore +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/lua/mod/inner.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/lua/mod.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-apidoc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/annotations.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/globals.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/globals_2.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/member_ordering.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/module_title.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/nested_modules.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/nesting.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/object_types.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/lua/relative_resolve.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/globals.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/member_ordering.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/module_title.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/nested_modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/nesting.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/nesting_recursive.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/object_types.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc/src/relative_resolve.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/.emmyrc.json +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/annotations.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/foo/x.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/global_tables.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/globals.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/globals_2.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/incongruent_export.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/member_ordering.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/module_title.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/nested_modules.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/nesting.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/object_types.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/relative_resolve.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/signatures.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/lua/using.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/global_tables.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/globals.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/incongruent_export.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/member_ordering.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/module_title.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/nested_modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/nesting.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/nesting_recursive.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/object_types.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/relative_resolve.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/require.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/signatures.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-emmylua/src/using.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/lua/root_1/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/lua/root_2/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-roots/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-settings/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-settings/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-settings/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-settings/lua/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-autodoc-settings/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/inherited.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-doc/src/refs.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-intersphinx/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-intersphinx/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-intersphinx/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/roots/test-intersphinx/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_parse.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/apidoc-md-sep.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/apidoc-md.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/apidoc-rst-sep.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/apidoc-rst.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-autoindex.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-autoindex.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-incongruent_export.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-module_title.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-nested_modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-emmylua-using.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-module_title.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-nested_modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-roots-default.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-roots-no-roots.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-roots-single-root.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-settings-annotation.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-settings-no-recursion.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/autodoc-settings-simple.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression/doc-refs.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.2.0}/test/test_regression.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
groups:
|
|
8
|
+
dev:
|
|
9
|
+
patterns:
|
|
10
|
+
- "black"
|
|
11
|
+
- "furo"
|
|
12
|
+
- "isort"
|
|
13
|
+
- "pre-commit"
|
|
14
|
+
- "pyright"
|
|
15
|
+
- "pytest_image_diff"
|
|
16
|
+
- "pytest-cov"
|
|
17
|
+
- "pytest"
|
|
18
|
+
- "reportlab"
|
|
19
|
+
- "sphinx_design"
|
|
20
|
+
- "svglib"
|
|
21
|
+
- "sybil"
|
|
@@ -155,7 +155,7 @@ jobs:
|
|
|
155
155
|
name: Build docs
|
|
156
156
|
needs:
|
|
157
157
|
- test
|
|
158
|
-
if: ${{
|
|
158
|
+
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && !contains(github.event.ref, '.dev') }}
|
|
159
159
|
runs-on: ubuntu-latest
|
|
160
160
|
steps:
|
|
161
161
|
- name: Checkout
|
|
@@ -187,38 +187,6 @@ jobs:
|
|
|
187
187
|
path: docs/build/html
|
|
188
188
|
include-hidden-files: true
|
|
189
189
|
|
|
190
|
-
# Publishes documentation preview and posts a comment to the initiating PR.
|
|
191
|
-
#
|
|
192
|
-
# This job runs on all pull request actions. If also runs when a pull request is closed,
|
|
193
|
-
# in this case it deletes the preview.
|
|
194
|
-
#
|
|
195
|
-
# Since the default condition -- `success()` -- only runs if all dependencies succeeded,
|
|
196
|
-
# we use `!failure() && !cancelled()`, which also runs when any dependencies were skipped.
|
|
197
|
-
publish_docs_preview:
|
|
198
|
-
name: Publish docs preview to GitHub Pages
|
|
199
|
-
needs:
|
|
200
|
-
- build_docs
|
|
201
|
-
if: ${{ !failure() && !cancelled() && github.event_name == 'pull_request' }}
|
|
202
|
-
concurrency:
|
|
203
|
-
group: publish-docs-${{ github.ref }}
|
|
204
|
-
cancel-in-progress: true
|
|
205
|
-
permissions: write-all
|
|
206
|
-
runs-on: ubuntu-latest
|
|
207
|
-
steps:
|
|
208
|
-
- name: Checkout
|
|
209
|
-
uses: actions/checkout@v4
|
|
210
|
-
- name: Download artifact
|
|
211
|
-
if: ${{ needs.build_docs.result == 'success' }} # only download docs if build wasn't skipped
|
|
212
|
-
uses: actions/download-artifact@v4
|
|
213
|
-
with:
|
|
214
|
-
name: html_output
|
|
215
|
-
path: docs/build/html
|
|
216
|
-
- name: Publish HTML
|
|
217
|
-
uses: rossjrw/pr-preview-action@v1
|
|
218
|
-
with:
|
|
219
|
-
source-dir: docs/build/html
|
|
220
|
-
umbrella-dir: pr-preview
|
|
221
|
-
|
|
222
190
|
# Builds and publishes production docs.
|
|
223
191
|
#
|
|
224
192
|
# Only runs on tag pushes.
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v3.2.0
|
|
4
|
+
|
|
5
|
+
- Updated a few dependencies. Most notably, restricted `sphinx` to `<9`.
|
|
6
|
+
|
|
7
|
+
- Fixed dashes in types being parsed as type names ([#18] by [@bkoropoff]).
|
|
8
|
+
|
|
9
|
+
- Added normalization for function syntax (`fun() -> T` is converted to `fun(): T`).
|
|
10
|
+
|
|
11
|
+
- Done some internal refactorings.
|
|
12
|
+
|
|
13
|
+
[#18]: https://github.com/taminomara/sphinx-lua-ls/pull/18
|
|
14
|
+
[@bkoropoff]: https://github.com/bkoropoff
|
|
15
|
+
|
|
16
|
+
## v3.1.0
|
|
17
|
+
|
|
18
|
+
- Added pygments lexer for Lua that highlights documentation tags.
|
|
19
|
+
|
|
20
|
+
- Added option to control maximum signature length before wrapping.
|
|
21
|
+
|
|
22
|
+
- Sphinx's nitpicky mode will no longer emit warnings
|
|
23
|
+
for cross-references in signatures.
|
|
24
|
+
|
|
25
|
+
- Fixed generation of URL anchors to avoid duplicates.
|
|
26
|
+
|
|
27
|
+
- Fixed some edge cases in parsing of type expressions.
|
|
28
|
+
|
|
3
29
|
## v3.0.0
|
|
4
30
|
|
|
5
31
|
- **Breaking change:** changed how `apidoc` generates file names to avoid collisions.
|
|
@@ -15,7 +41,7 @@
|
|
|
15
41
|
- it exports way more metadata, including function overloads and class constructors,
|
|
16
42
|
- you don't have to annotate modules with `@class` and `!doctype` anymore.
|
|
17
43
|
|
|
18
|
-
I plan to use EmmyLua as the default language server since *
|
|
44
|
+
I plan to use EmmyLua as the default language server since *v4.0.0*.
|
|
19
45
|
|
|
20
46
|
- Long object signatures are now broken into multiple lines.
|
|
21
47
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sphinx-lua-ls
|
|
3
|
+
Version: 3.2.0
|
|
4
|
+
Summary: Automatic documentation generation via EmmyLua/LuaLs
|
|
5
|
+
Author-email: Tamika Nomara <taminomara@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Documentation, https://taminomara.github.io/sphinx-lua-ls/
|
|
8
|
+
Project-URL: Issues, https://github.com/taminomara/sphinx-lua-ls/issues
|
|
9
|
+
Project-URL: Source, https://github.com/taminomara/sphinx-lua-ls/
|
|
10
|
+
Project-URL: Changelog, https://github.com/taminomara/sphinx-lua-ls/blob/main/CHANGELOG.md
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Framework :: Sphinx
|
|
18
|
+
Classifier: Framework :: Sphinx :: Domain
|
|
19
|
+
Classifier: Framework :: Sphinx :: Extension
|
|
20
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
21
|
+
Classifier: Topic :: Documentation
|
|
22
|
+
Classifier: Topic :: Documentation :: Sphinx
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: sphinx<9.0,>=8.0
|
|
28
|
+
Requires-Dist: PyGithub<3.0,>=1.59
|
|
29
|
+
Requires-Dist: requests~=2.31
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest-cov==6.2.1; extra == "dev"
|
|
32
|
+
Requires-Dist: sphinx-lua-ls[doc,lint,test]; extra == "dev"
|
|
33
|
+
Provides-Extra: lint
|
|
34
|
+
Requires-Dist: black==25.1.0; extra == "lint"
|
|
35
|
+
Requires-Dist: isort==6.0.1; extra == "lint"
|
|
36
|
+
Requires-Dist: pre-commit==4.3.0; extra == "lint"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pyright==1.1.404; extra == "test"
|
|
39
|
+
Requires-Dist: pytest==8.4.1; extra == "test"
|
|
40
|
+
Requires-Dist: sybil==9.2.0; extra == "test"
|
|
41
|
+
Requires-Dist: pytest-regressions==2.8.2; extra == "test"
|
|
42
|
+
Requires-Dist: beautifulsoup4==4.13.5; extra == "test"
|
|
43
|
+
Requires-Dist: myst-parser==4.0.1; extra == "test"
|
|
44
|
+
Provides-Extra: doc
|
|
45
|
+
Requires-Dist: sybil==9.2.0; extra == "doc"
|
|
46
|
+
Requires-Dist: furo==2025.7.19; extra == "doc"
|
|
47
|
+
Requires-Dist: sphinx_design==0.6.1; extra == "doc"
|
|
48
|
+
Requires-Dist: myst-parser==4.0.1; extra == "doc"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
# Sphinx plugin for Lua and Lua Language Server
|
|
52
|
+
|
|
53
|
+
Document Lua projects using Lua Language Server's output. This plugin features:
|
|
54
|
+
|
|
55
|
+
- new domain for Lua language,
|
|
56
|
+
- directives to automatically generate documentation based on source code.
|
|
57
|
+
|
|
58
|
+
## Resources
|
|
59
|
+
|
|
60
|
+
- [Documentation](https://taminomara.github.io/sphinx-lua-ls/)
|
|
61
|
+
- [Installation](https://taminomara.github.io/sphinx-lua-ls/#installation)
|
|
62
|
+
- [Quickstart](https://taminomara.github.io/sphinx-lua-ls/#quickstart)
|
|
63
|
+
- [Example output](https://taminomara.github.io/sphinx-lua-ls/#example-output)
|
|
64
|
+
|
|
65
|
+
## Requirements
|
|
66
|
+
|
|
67
|
+
- python >= 3.12
|
|
68
|
+
- sphinx >= 8.0
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
pip install sphinx-lua-ls
|
|
74
|
+
```
|
|
@@ -6,7 +6,7 @@ based on `EmmyLua`_ or `LuaLs`_ language servers.
|
|
|
6
6
|
|
|
7
7
|
.. _Lua: https://lua.org
|
|
8
8
|
.. _EmmyLua: https://github.com/EmmyLuaLs/emmylua-analyzer-rust/
|
|
9
|
-
.. _LuaLs: https://
|
|
9
|
+
.. _LuaLs: https://luals.github.io/
|
|
10
10
|
|
|
11
11
|
See an example output: `logging`.
|
|
12
12
|
|
|
@@ -130,28 +130,43 @@ You'll need a Python installation and a Sphinx project to start with Sphinx-LuaL
|
|
|
130
130
|
|
|
131
131
|
lua_ls_backend = "emmylua"
|
|
132
132
|
|
|
133
|
-
.. note::
|
|
134
|
-
|
|
135
|
-
If you're on Linux x64, Windows x64, or MacOs arm, Sphinx-LuaLs will
|
|
136
|
-
download EmmyLua's documentation tool automatically. Otherwise,
|
|
137
|
-
you'll need to install ``emmylua_doc_cli`` manually,
|
|
138
|
-
see `instructions at github`_.
|
|
139
|
-
|
|
140
133
|
.. tip::
|
|
141
134
|
|
|
142
|
-
Add the following settings to your ``.emmyrc.json`` to enable
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
..
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
135
|
+
Add the following settings to your ``.emmyrc.json`` to enable syntax
|
|
136
|
+
highlighting and Go To Definition for comments:
|
|
137
|
+
|
|
138
|
+
.. tab-set::
|
|
139
|
+
:sync-group: lang
|
|
140
|
+
|
|
141
|
+
.. tab-item:: RST
|
|
142
|
+
:sync: rst
|
|
143
|
+
|
|
144
|
+
.. code-block:: json
|
|
145
|
+
|
|
146
|
+
{
|
|
147
|
+
"diagnostics": {
|
|
148
|
+
"enables": ["unknown-doc-tag"]
|
|
149
|
+
},
|
|
150
|
+
"doc": {
|
|
151
|
+
"knownTags": ["doctype", "doc"],
|
|
152
|
+
"syntax": "rst"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.. tab-item:: Markdown
|
|
157
|
+
:sync: md
|
|
158
|
+
|
|
159
|
+
.. code-block:: json
|
|
160
|
+
|
|
161
|
+
{
|
|
162
|
+
"diagnostics": {
|
|
163
|
+
"enables": ["unknown-doc-tag"]
|
|
164
|
+
},
|
|
165
|
+
"doc": {
|
|
166
|
+
"knownTags": ["doctype", "doc"],
|
|
167
|
+
"syntax": "myst"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
155
170
|
|
|
156
171
|
.. tab-item:: LuaLs
|
|
157
172
|
:sync: luals
|
|
@@ -85,6 +85,46 @@ and others to document module's contents.
|
|
|
85
85
|
A sound that can be played by the sound board.
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
.. dropdown:: Setting up primary domain in EmmyLua
|
|
89
|
+
|
|
90
|
+
To enable accurate Go To Definition behavior for comments,
|
|
91
|
+
add ``rstPrimaryDomain`` setting to your ``.emmyrc.json``:
|
|
92
|
+
|
|
93
|
+
.. tab-set::
|
|
94
|
+
:sync-group: lang
|
|
95
|
+
|
|
96
|
+
.. tab-item:: RST
|
|
97
|
+
:sync: rst
|
|
98
|
+
|
|
99
|
+
.. code-block:: json
|
|
100
|
+
|
|
101
|
+
{
|
|
102
|
+
"diagnostics": {
|
|
103
|
+
"enables": ["unknown-doc-tag"]
|
|
104
|
+
},
|
|
105
|
+
"doc": {
|
|
106
|
+
"knownTags": ["doctype", "doc"],
|
|
107
|
+
"syntax": "rst",
|
|
108
|
+
"rstPrimaryDomain": "lua"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.. tab-item:: Markdown
|
|
113
|
+
:sync: md
|
|
114
|
+
|
|
115
|
+
.. code-block:: json
|
|
116
|
+
|
|
117
|
+
{
|
|
118
|
+
"diagnostics": {
|
|
119
|
+
"enables": ["unknown-doc-tag"]
|
|
120
|
+
},
|
|
121
|
+
"doc": {
|
|
122
|
+
"knownTags": ["doctype", "doc"],
|
|
123
|
+
"syntax": "myst",
|
|
124
|
+
"rstPrimaryDomain": "lua"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
88
128
|
|
|
89
129
|
Cross-referencing objects
|
|
90
130
|
-------------------------
|
|
@@ -152,6 +192,46 @@ and :rst:role:`lua:class` roles:
|
|
|
152
192
|
|
|
153
193
|
Reference to a {lua}`logging.Logger.info`.
|
|
154
194
|
|
|
195
|
+
.. dropdown:: Setting up default role in EmmyLua
|
|
196
|
+
|
|
197
|
+
To enable accurate Go To Definition behavior for comments,
|
|
198
|
+
add ``rstDefaultRole`` setting to your ``.emmyrc.json``:
|
|
199
|
+
|
|
200
|
+
.. tab-set::
|
|
201
|
+
:sync-group: lang
|
|
202
|
+
|
|
203
|
+
.. tab-item:: RST
|
|
204
|
+
:sync: rst
|
|
205
|
+
|
|
206
|
+
.. code-block:: json
|
|
207
|
+
|
|
208
|
+
{
|
|
209
|
+
"diagnostics": {
|
|
210
|
+
"enables": ["unknown-doc-tag"]
|
|
211
|
+
},
|
|
212
|
+
"doc": {
|
|
213
|
+
"knownTags": ["doctype", "doc"],
|
|
214
|
+
"syntax": "rst",
|
|
215
|
+
"rstDefaultRole": "lua:obj"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.. tab-item:: Markdown
|
|
220
|
+
:sync: md
|
|
221
|
+
|
|
222
|
+
.. code-block:: json
|
|
223
|
+
|
|
224
|
+
{
|
|
225
|
+
"diagnostics": {
|
|
226
|
+
"enables": ["unknown-doc-tag"]
|
|
227
|
+
},
|
|
228
|
+
"doc": {
|
|
229
|
+
"knownTags": ["doctype", "doc"],
|
|
230
|
+
"syntax": "myst",
|
|
231
|
+
"rstDefaultRole": "lua:obj"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
155
235
|
|
|
156
236
|
Automatic documentation generation
|
|
157
237
|
----------------------------------
|
|
@@ -6,7 +6,7 @@ Cross-referencing objects
|
|
|
6
6
|
|
|
7
7
|
You can reference any documented object through the :rst:role:`lua:obj` role.
|
|
8
8
|
|
|
9
|
-
Given an object path,
|
|
9
|
+
Given an object path, Sphinx-LuaLs will first search for an object with this path
|
|
10
10
|
in the outer-most class, then in the current module, and finally
|
|
11
11
|
in the global namespace.
|
|
12
12
|
|
|
@@ -18,7 +18,6 @@ Cross-referencing objects
|
|
|
18
18
|
If you specify a fully qualified object name, and would like to hide its prefix,
|
|
19
19
|
you can add a tilde (``~``) to the object's path:
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
.. tab-set::
|
|
23
22
|
:sync-group: lang
|
|
24
23
|
|
|
@@ -188,3 +188,15 @@ Settings
|
|
|
188
188
|
:type: str
|
|
189
189
|
|
|
190
190
|
Format for generated files. Can be either ``"rst"`` or ``"md"``.
|
|
191
|
+
|
|
192
|
+
.. py:data:: lua_ls_maximum_signature_line_length
|
|
193
|
+
:type: int | None
|
|
194
|
+
|
|
195
|
+
Controls maximum width after which long signatures will be wrapped.
|
|
196
|
+
|
|
197
|
+
Default value is ``50``, which is suitable for most Sphinx themes.
|
|
198
|
+
|
|
199
|
+
Setting this value to `None` will cause signature formatter
|
|
200
|
+
to use Sphinx's global setting ``maximum_signature_line_length``.
|
|
201
|
+
If ``maximum_signature_line_length`` is also ``None``,
|
|
202
|
+
signature wrapping will be disabled.
|
|
@@ -4,7 +4,7 @@ authors = [{name = "Tamika Nomara", email = "taminomara@gmail.com"}]
|
|
|
4
4
|
description = "Automatic documentation generation via EmmyLua/LuaLs"
|
|
5
5
|
dynamic = ["version"]
|
|
6
6
|
readme = "README.md"
|
|
7
|
-
license =
|
|
7
|
+
license = "MIT"
|
|
8
8
|
requires-python = ">=3.12"
|
|
9
9
|
classifiers = [
|
|
10
10
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -12,7 +12,6 @@ classifiers = [
|
|
|
12
12
|
"Programming Language :: Python :: 3",
|
|
13
13
|
"Programming Language :: Python :: 3.12",
|
|
14
14
|
"Programming Language :: Python :: 3.13",
|
|
15
|
-
"License :: OSI Approved :: MIT License",
|
|
16
15
|
"Intended Audience :: Developers",
|
|
17
16
|
"Framework :: Sphinx",
|
|
18
17
|
"Framework :: Sphinx :: Domain",
|
|
@@ -23,34 +22,34 @@ classifiers = [
|
|
|
23
22
|
"Typing :: Typed",
|
|
24
23
|
]
|
|
25
24
|
dependencies = [
|
|
26
|
-
"sphinx>=8.0",
|
|
27
|
-
"PyGithub
|
|
25
|
+
"sphinx>=8.0,<9.0",
|
|
26
|
+
"PyGithub>=1.59,<3.0",
|
|
28
27
|
"requests~=2.31",
|
|
29
28
|
]
|
|
30
29
|
|
|
31
30
|
[project.optional-dependencies]
|
|
32
31
|
dev = [
|
|
33
|
-
"pytest-cov
|
|
32
|
+
"pytest-cov==6.2.1",
|
|
34
33
|
"sphinx-lua-ls[test,lint,doc]",
|
|
35
34
|
]
|
|
36
35
|
lint = [
|
|
37
|
-
"black
|
|
38
|
-
"isort
|
|
39
|
-
"pre-commit
|
|
36
|
+
"black==25.1.0",
|
|
37
|
+
"isort==6.0.1",
|
|
38
|
+
"pre-commit==4.3.0",
|
|
40
39
|
]
|
|
41
40
|
test = [
|
|
42
|
-
"pyright
|
|
43
|
-
"pytest
|
|
44
|
-
"sybil
|
|
45
|
-
"pytest-regressions
|
|
46
|
-
"beautifulsoup4
|
|
47
|
-
"myst-parser
|
|
41
|
+
"pyright==1.1.404",
|
|
42
|
+
"pytest==8.4.1",
|
|
43
|
+
"sybil==9.2.0",
|
|
44
|
+
"pytest-regressions==2.8.2",
|
|
45
|
+
"beautifulsoup4==4.13.5",
|
|
46
|
+
"myst-parser==4.0.1"
|
|
48
47
|
]
|
|
49
48
|
doc = [
|
|
50
|
-
"sybil
|
|
51
|
-
"furo
|
|
52
|
-
"sphinx_design
|
|
53
|
-
"myst-parser
|
|
49
|
+
"sybil==9.2.0",
|
|
50
|
+
"furo==2025.7.19",
|
|
51
|
+
"sphinx_design==0.6.1",
|
|
52
|
+
"myst-parser==4.0.1"
|
|
54
53
|
]
|
|
55
54
|
|
|
56
55
|
[project.urls]
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import fnmatch
|
|
2
|
+
import pathlib
|
|
3
|
+
import re
|
|
4
|
+
import typing as _t
|
|
5
|
+
|
|
6
|
+
import sphinx.addnodes
|
|
7
|
+
import sphinx.application
|
|
8
|
+
import sphinx.builders
|
|
9
|
+
import sphinx.builders.html
|
|
10
|
+
import sphinx.domains
|
|
11
|
+
import sphinx.errors
|
|
12
|
+
from sphinx.util.display import progress_message
|
|
13
|
+
from sphinx.util.fileutil import copy_asset_file
|
|
14
|
+
|
|
15
|
+
import sphinx_lua_ls.apidoc
|
|
16
|
+
import sphinx_lua_ls.autodoc
|
|
17
|
+
import sphinx_lua_ls.autoindex
|
|
18
|
+
import sphinx_lua_ls.config
|
|
19
|
+
import sphinx_lua_ls.domain
|
|
20
|
+
import sphinx_lua_ls.inherited
|
|
21
|
+
import sphinx_lua_ls.intersphinx
|
|
22
|
+
import sphinx_lua_ls.lua_ls
|
|
23
|
+
import sphinx_lua_ls.objtree
|
|
24
|
+
from sphinx_lua_ls._version import __version__, __version_tuple__
|
|
25
|
+
from sphinx_lua_ls.pygments import LuaLexer
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def run_lua_ls(app: sphinx.application.Sphinx):
|
|
29
|
+
domain: sphinx_lua_ls.domain.LuaDomain = app.env.get_domain("lua") # type: ignore
|
|
30
|
+
|
|
31
|
+
root_dir = domain.config.project_root
|
|
32
|
+
project_directories = domain.config.project_directories
|
|
33
|
+
if project_directories is None:
|
|
34
|
+
project_directories = [root_dir]
|
|
35
|
+
project_directories.sort()
|
|
36
|
+
|
|
37
|
+
modified = (
|
|
38
|
+
"objtree" not in domain.data
|
|
39
|
+
or "objtree_roots" not in domain.data
|
|
40
|
+
or "objtree_paths" not in domain.data
|
|
41
|
+
or domain.data["objtree_roots"] != project_directories
|
|
42
|
+
)
|
|
43
|
+
if not modified:
|
|
44
|
+
for path, modtime in domain.data["objtree_paths"].items():
|
|
45
|
+
if not path.exists() or path.stat().st_mtime_ns > modtime:
|
|
46
|
+
modified = True
|
|
47
|
+
break
|
|
48
|
+
if not modified:
|
|
49
|
+
for dir in project_directories:
|
|
50
|
+
for path in dir.rglob("*.lua"):
|
|
51
|
+
if path not in domain.data["objtree_paths"]:
|
|
52
|
+
modified = True
|
|
53
|
+
break
|
|
54
|
+
if not modified:
|
|
55
|
+
return
|
|
56
|
+
|
|
57
|
+
min_version = domain.config.min_version
|
|
58
|
+
if min_version is None:
|
|
59
|
+
if domain.config.backend == "luals":
|
|
60
|
+
min_version = "3.0.0"
|
|
61
|
+
else:
|
|
62
|
+
min_version = "0.11.0"
|
|
63
|
+
|
|
64
|
+
cwd = pathlib.Path.cwd()
|
|
65
|
+
try:
|
|
66
|
+
runner = sphinx_lua_ls.lua_ls.resolve(
|
|
67
|
+
backend=domain.config.backend,
|
|
68
|
+
min_version=min_version,
|
|
69
|
+
cwd=root_dir,
|
|
70
|
+
reporter=sphinx_lua_ls.lua_ls.SphinxProgressReporter(app.verbosity),
|
|
71
|
+
install=domain.config.auto_install,
|
|
72
|
+
cache_path=domain.config.auto_install_location,
|
|
73
|
+
)
|
|
74
|
+
except sphinx_lua_ls.lua_ls.LuaLsError as e:
|
|
75
|
+
raise
|
|
76
|
+
except Exception as e:
|
|
77
|
+
raise sphinx.errors.ExtensionError(str(e)) from e
|
|
78
|
+
|
|
79
|
+
if domain.config.backend == "luals":
|
|
80
|
+
parser = sphinx_lua_ls.objtree.LuaLsParser()
|
|
81
|
+
else:
|
|
82
|
+
parser = sphinx_lua_ls.objtree.EmmyLuaParser()
|
|
83
|
+
|
|
84
|
+
configs = []
|
|
85
|
+
if (path := pathlib.Path(root_dir, ".emmyrc.json")).exists():
|
|
86
|
+
configs.append(path)
|
|
87
|
+
if (path := pathlib.Path(root_dir, ".luarc.json")).exists():
|
|
88
|
+
configs.append(path)
|
|
89
|
+
parser.files.update(configs)
|
|
90
|
+
|
|
91
|
+
for dir in project_directories:
|
|
92
|
+
try:
|
|
93
|
+
relpath = dir.relative_to(cwd, walk_up=True)
|
|
94
|
+
except ValueError:
|
|
95
|
+
relpath = dir
|
|
96
|
+
with progress_message(f"running lua language server in {relpath or '.'}"):
|
|
97
|
+
parser.class_default_function_name = (
|
|
98
|
+
domain.config.class_default_function_name
|
|
99
|
+
)
|
|
100
|
+
parser.class_default_force_non_colon = (
|
|
101
|
+
domain.config.class_default_force_non_colon
|
|
102
|
+
)
|
|
103
|
+
parser.class_default_force_return_self = (
|
|
104
|
+
domain.config.class_default_force_return_self
|
|
105
|
+
)
|
|
106
|
+
parser.parse(runner.run(dir, configs=configs), dir)
|
|
107
|
+
parser.files.update(map(pathlib.Path, dir.rglob("*.lua")))
|
|
108
|
+
|
|
109
|
+
domain.objtree = parser.root
|
|
110
|
+
domain.data["objtree_roots"] = project_directories
|
|
111
|
+
domain.data["objtree_paths"] = {p: p.stat().st_mtime_ns for p in parser.files}
|
|
112
|
+
|
|
113
|
+
if parser.runtime_version and not domain.config.lua_version:
|
|
114
|
+
domain.config.lua_version = parser.runtime_version
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def run_apidoc(
|
|
118
|
+
app: sphinx.application.Sphinx,
|
|
119
|
+
):
|
|
120
|
+
domain = _t.cast(sphinx_lua_ls.domain.LuaDomain, app.env.get_domain("lua"))
|
|
121
|
+
cwd = pathlib.Path.cwd()
|
|
122
|
+
for name, params in domain.config.apidoc_roots.items():
|
|
123
|
+
try:
|
|
124
|
+
relpath = params["path"].relative_to(cwd, walk_up=True)
|
|
125
|
+
except ValueError:
|
|
126
|
+
relpath = params["path"]
|
|
127
|
+
with progress_message(f"running lua apidoc in {relpath or '.'}"):
|
|
128
|
+
ignored_modules = params["ignored_modules"]
|
|
129
|
+
if ignored_modules:
|
|
130
|
+
mod_filter = re.compile(
|
|
131
|
+
"|".join(f"(?:{fnmatch.translate(e)})" for e in ignored_modules)
|
|
132
|
+
).match
|
|
133
|
+
else:
|
|
134
|
+
mod_filter = lambda s: False
|
|
135
|
+
sphinx_lua_ls.apidoc.generate(
|
|
136
|
+
outdir=app.outdir,
|
|
137
|
+
domain=domain,
|
|
138
|
+
dir=params["path"],
|
|
139
|
+
fullname=name,
|
|
140
|
+
objtree=domain.objtree,
|
|
141
|
+
options=params["options"],
|
|
142
|
+
depth=params["max_depth"],
|
|
143
|
+
mod_filter=mod_filter,
|
|
144
|
+
format=params["format"],
|
|
145
|
+
separate_members=params["separate_members"],
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def copy_asset_files(app: sphinx.application.Sphinx, exc: Exception | None):
|
|
150
|
+
if isinstance(app.builder, sphinx.builders.html.StandaloneHTMLBuilder) and not exc:
|
|
151
|
+
custom_file = pathlib.Path(__file__).parent / "static/lua.css"
|
|
152
|
+
static_dir = app.outdir / "_static"
|
|
153
|
+
copy_asset_file(custom_file, static_dir)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def suppress_auto_ref_warnings(
|
|
157
|
+
app: sphinx.application.Sphinx,
|
|
158
|
+
domain: sphinx.domains.Domain,
|
|
159
|
+
node: sphinx.addnodes.pending_xref,
|
|
160
|
+
):
|
|
161
|
+
if node["refdomain"] == "lua" and node["reftype"] == "_auto":
|
|
162
|
+
return True
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def setup(app: sphinx.application.Sphinx):
|
|
166
|
+
app.add_domain(sphinx_lua_ls.domain.LuaDomain)
|
|
167
|
+
|
|
168
|
+
app.add_config_value("lua_ls_backend", None, rebuild="env")
|
|
169
|
+
app.add_config_value("lua_ls_project_root", None, rebuild="env")
|
|
170
|
+
app.add_config_value("lua_ls_project_directories", None, rebuild="env")
|
|
171
|
+
app.add_config_value("lua_ls_auto_install", True, rebuild="")
|
|
172
|
+
app.add_config_value("lua_ls_auto_install_location", None, rebuild="")
|
|
173
|
+
app.add_config_value("lua_ls_min_version", None, rebuild="env")
|
|
174
|
+
app.add_config_value("lua_ls_lua_version", None, rebuild="html")
|
|
175
|
+
app.add_config_value("lua_ls_default_options", None, rebuild="env")
|
|
176
|
+
app.add_config_value("lua_ls_apidoc_roots", None, rebuild="")
|
|
177
|
+
app.add_config_value("lua_ls_apidoc_default_options", None, rebuild="")
|
|
178
|
+
app.add_config_value("lua_ls_apidoc_max_depth", None, rebuild="")
|
|
179
|
+
app.add_config_value("lua_ls_apidoc_ignored_modules", None, rebuild="")
|
|
180
|
+
app.add_config_value("lua_ls_apidoc_format", None, rebuild="")
|
|
181
|
+
app.add_config_value("lua_ls_apidoc_separate_members", None, rebuild="")
|
|
182
|
+
app.add_config_value("lua_ls_class_default_function_name", None, rebuild="env")
|
|
183
|
+
app.add_config_value("lua_ls_class_default_force_non_colon", None, rebuild="env")
|
|
184
|
+
app.add_config_value("lua_ls_class_default_force_return_self", None, rebuild="env")
|
|
185
|
+
app.add_config_value("lua_ls_maximum_signature_line_length", 50, rebuild="env")
|
|
186
|
+
|
|
187
|
+
app.add_directive_to_domain(
|
|
188
|
+
"lua", "autoobject", sphinx_lua_ls.autodoc.AutoObjectDirective
|
|
189
|
+
)
|
|
190
|
+
app.add_directive_to_domain(
|
|
191
|
+
"lua", "autoindex", sphinx_lua_ls.autoindex.AutoIndexDirective
|
|
192
|
+
)
|
|
193
|
+
app.add_directive_to_domain(
|
|
194
|
+
"lua",
|
|
195
|
+
"other-inherited-members",
|
|
196
|
+
sphinx_lua_ls.inherited.InheritedMembersDirective,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
app.connect("builder-inited", sphinx_lua_ls.config.set_options)
|
|
200
|
+
app.connect("builder-inited", run_lua_ls)
|
|
201
|
+
app.connect("builder-inited", run_apidoc)
|
|
202
|
+
app.connect("missing-reference", sphinx_lua_ls.intersphinx.resolve_std_reference)
|
|
203
|
+
app.connect("build-finished", copy_asset_files)
|
|
204
|
+
app.connect("warn-missing-reference", suppress_auto_ref_warnings)
|
|
205
|
+
|
|
206
|
+
app.add_post_transform(sphinx_lua_ls.autoindex.AutoIndexTransform)
|
|
207
|
+
app.add_post_transform(sphinx_lua_ls.inherited.InheritedMembersTransform)
|
|
208
|
+
|
|
209
|
+
app.add_lexer("lua", LuaLexer)
|
|
210
|
+
|
|
211
|
+
app.add_css_file("lua.css")
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
"version": __version__,
|
|
215
|
+
"parallel_read_safe": True,
|
|
216
|
+
"parallel_write_safe": True,
|
|
217
|
+
}
|