sphinx-lua-ls 3.0.0__tar.gz → 3.1.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.0.0 → sphinx_lua_ls-3.1.0}/CHANGELOG.md +14 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/PKG-INFO +2 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/index.rst +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/installation.rst +35 -20
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/quickstart.rst +80 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/settings.rst +12 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/pyproject.toml +1 -2
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/__init__.py +28 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/_version.py +16 -3
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/domain.py +51 -35
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/lua_ls.py +11 -0
- sphinx_lua_ls-3.1.0/sphinx_lua_ls/pygments.py +21 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/utils.py +6 -11
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls.egg-info/PKG-INFO +2 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls.egg-info/SOURCES.txt +1 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-global_tables.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-globals.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-member_ordering.html +8 -8
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-nesting.html +10 -10
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-nesting_recursive.html +24 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-object_types.html +49 -49
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-relative_resolve.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-require.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-signatures.html +23 -23
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-globals.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-member_ordering.html +8 -8
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-nesting.html +10 -10
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-nesting_recursive.html +24 -24
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-object_types.html +56 -56
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-relative_resolve.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-autoindex.html +1 -1
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-directives.html +52 -52
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-inherited.html +3 -3
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/.github/workflows/ci.yaml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/.gitignore +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/.pre-commit-config.yaml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/CONTRIBUTING.md +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/LICENSE +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/README.md +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/conftest.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/example/.emmyrc.json +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/example/logging.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/_extra/robots.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/apidoc.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/autodoc.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/directives.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/example.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/docs/source/roles.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/setup.cfg +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/apidoc.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/autodoc.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/autoindex.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/inherited.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/intersphinx.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/objtree.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/py.typed +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls/static/lua.css +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls.egg-info/dependency_links.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls.egg-info/requires.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/sphinx_lua_ls.egg-info/top_level.txt +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/conftest.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/.gitignore +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/lua/mod/inner.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/lua/mod.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-apidoc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/annotations.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/globals.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/globals_2.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/member_ordering.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/module_title.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/nested_modules.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/nesting.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/object_types.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/lua/relative_resolve.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/globals.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/member_ordering.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/module_title.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/nested_modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/nesting.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/nesting_recursive.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/object_types.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc/src/relative_resolve.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/.emmyrc.json +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/annotations.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/foo/x.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/global_tables.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/globals.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/globals_2.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/incongruent_export.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/member_ordering.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/module_title.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/nested_modules.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/nesting.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/object_types.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/relative_resolve.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/signatures.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/lua/using.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/global_tables.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/globals.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/incongruent_export.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/member_ordering.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/module_title.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/nested_modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/nesting.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/nesting_recursive.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/object_types.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/relative_resolve.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/require.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/signatures.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-emmylua/src/using.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/lua/root_1/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/lua/root_2/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-roots/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-settings/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-settings/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-settings/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-settings/lua/autodoc.lua +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-autodoc-settings/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/annotations.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/autoindex.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/directives.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/inherited.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/modules.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-doc/src/refs.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-intersphinx/Makefile +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-intersphinx/conf.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-intersphinx/index.rst +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/roots/test-intersphinx/make.bat +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_parse.py +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/apidoc-md-sep.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/apidoc-md.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/apidoc-rst-sep.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/apidoc-rst.yml +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-autoindex.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-autoindex.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-incongruent_export.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-module_title.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-nested_modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-emmylua-using.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-module_title.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-nested_modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-roots-default.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-roots-no-roots.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-roots-single-root.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-settings-annotation.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-settings-no-recursion.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/autodoc-settings-simple.html.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-annotations.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-modules.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression/doc-refs.html +0 -0
- {sphinx_lua_ls-3.0.0 → sphinx_lua_ls-3.1.0}/test/test_regression.py +0 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v3.1.0
|
|
4
|
+
|
|
5
|
+
- Added pygments lexer for Lua that highlights documentation tags.
|
|
6
|
+
|
|
7
|
+
- Added option to control maximum signature length before wrapping.
|
|
8
|
+
|
|
9
|
+
- Sphinx's nitpicky mode will no longer emit warnings
|
|
10
|
+
for cross-references in signatures.
|
|
11
|
+
|
|
12
|
+
- Fixed generation of URL anchors to avoid duplicates.
|
|
13
|
+
|
|
14
|
+
- Fixed some edge cases in parsing of type expressions.
|
|
15
|
+
|
|
3
16
|
## v3.0.0
|
|
4
17
|
|
|
5
18
|
- **Breaking change:** changed how `apidoc` generates file names to avoid collisions.
|
|
@@ -15,7 +28,7 @@
|
|
|
15
28
|
- it exports way more metadata, including function overloads and class constructors,
|
|
16
29
|
- you don't have to annotate modules with `@class` and `!doctype` anymore.
|
|
17
30
|
|
|
18
|
-
I plan to use EmmyLua as the default language server since *
|
|
31
|
+
I plan to use EmmyLua as the default language server since *v4.0.0*.
|
|
19
32
|
|
|
20
33
|
- Long object signatures are now broken into multiple lines.
|
|
21
34
|
|
|
@@ -1,30 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sphinx-lua-ls
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Automatic documentation generation via EmmyLua/LuaLs
|
|
5
5
|
Author-email: Tamika Nomara <taminomara@gmail.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2018 Tamika Nomara
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
27
|
-
|
|
6
|
+
License-Expression: MIT
|
|
28
7
|
Project-URL: Documentation, https://taminomara.github.io/sphinx-lua-ls/
|
|
29
8
|
Project-URL: Issues, https://github.com/taminomara/sphinx-lua-ls/issues
|
|
30
9
|
Project-URL: Source, https://github.com/taminomara/sphinx-lua-ls/
|
|
@@ -34,7 +13,6 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
34
13
|
Classifier: Programming Language :: Python :: 3
|
|
35
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
36
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
37
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
38
16
|
Classifier: Intended Audience :: Developers
|
|
39
17
|
Classifier: Framework :: Sphinx
|
|
40
18
|
Classifier: Framework :: Sphinx :: Domain
|
|
@@ -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
|
----------------------------------
|
|
@@ -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",
|
|
@@ -3,7 +3,9 @@ import pathlib
|
|
|
3
3
|
import re
|
|
4
4
|
from typing import Any, Type, TypeVar
|
|
5
5
|
|
|
6
|
+
import sphinx.addnodes
|
|
6
7
|
import sphinx.application
|
|
8
|
+
import sphinx.domains
|
|
7
9
|
import sphinx.errors
|
|
8
10
|
from sphinx.errors import ConfigError
|
|
9
11
|
from sphinx.util import logging
|
|
@@ -19,6 +21,7 @@ import sphinx_lua_ls.intersphinx
|
|
|
19
21
|
import sphinx_lua_ls.lua_ls
|
|
20
22
|
import sphinx_lua_ls.objtree
|
|
21
23
|
from sphinx_lua_ls._version import __version__, __version_tuple__
|
|
24
|
+
from sphinx_lua_ls.pygments import LuaLexer
|
|
22
25
|
|
|
23
26
|
_logger = logging.getLogger("sphinx_lua_ls")
|
|
24
27
|
|
|
@@ -254,6 +257,18 @@ def check_options(app: sphinx.application.Sphinx):
|
|
|
254
257
|
config["lua_ls_class_default_force_return_self"],
|
|
255
258
|
bool,
|
|
256
259
|
)
|
|
260
|
+
if config["lua_ls_maximum_signature_line_length"] is not None:
|
|
261
|
+
domain.config["maximum_signature_line_length"] = _type(
|
|
262
|
+
"lua_ls_maximum_signature_line_length",
|
|
263
|
+
config["lua_ls_maximum_signature_line_length"],
|
|
264
|
+
int,
|
|
265
|
+
)
|
|
266
|
+
else:
|
|
267
|
+
domain.config["maximum_signature_line_length"] = _type(
|
|
268
|
+
"maximum_signature_line_length",
|
|
269
|
+
config["maximum_signature_line_length"],
|
|
270
|
+
(int, type(None)),
|
|
271
|
+
)
|
|
257
272
|
|
|
258
273
|
|
|
259
274
|
def run_lua_ls(app: sphinx.application.Sphinx):
|
|
@@ -375,6 +390,15 @@ def copy_asset_files(app: sphinx.application.Sphinx, exc: Exception | None):
|
|
|
375
390
|
copy_asset_file(custom_file, static_dir)
|
|
376
391
|
|
|
377
392
|
|
|
393
|
+
def suppress_auto_ref_warnings(
|
|
394
|
+
app: sphinx.application.Sphinx,
|
|
395
|
+
domain: sphinx.domains.Domain,
|
|
396
|
+
node: sphinx.addnodes.pending_xref,
|
|
397
|
+
):
|
|
398
|
+
if node["refdomain"] == "lua" and node["reftype"] == "_auto":
|
|
399
|
+
return True
|
|
400
|
+
|
|
401
|
+
|
|
378
402
|
def setup(app: sphinx.application.Sphinx):
|
|
379
403
|
app.add_domain(sphinx_lua_ls.domain.LuaDomain)
|
|
380
404
|
|
|
@@ -395,6 +419,7 @@ def setup(app: sphinx.application.Sphinx):
|
|
|
395
419
|
app.add_config_value("lua_ls_class_default_function_name", "", rebuild="env")
|
|
396
420
|
app.add_config_value("lua_ls_class_default_force_non_colon", False, rebuild="env")
|
|
397
421
|
app.add_config_value("lua_ls_class_default_force_return_self", False, rebuild="env")
|
|
422
|
+
app.add_config_value("lua_ls_maximum_signature_line_length", 50, rebuild="env")
|
|
398
423
|
|
|
399
424
|
app.add_directive_to_domain(
|
|
400
425
|
"lua", "autoobject", sphinx_lua_ls.autodoc.AutoObjectDirective
|
|
@@ -413,10 +438,13 @@ def setup(app: sphinx.application.Sphinx):
|
|
|
413
438
|
app.connect("builder-inited", run_apidoc)
|
|
414
439
|
app.connect("missing-reference", sphinx_lua_ls.intersphinx.resolve_std_reference)
|
|
415
440
|
app.connect("build-finished", copy_asset_files)
|
|
441
|
+
app.connect("warn-missing-reference", suppress_auto_ref_warnings)
|
|
416
442
|
|
|
417
443
|
app.add_post_transform(sphinx_lua_ls.autoindex.AutoIndexTransform)
|
|
418
444
|
app.add_post_transform(sphinx_lua_ls.inherited.InheritedMembersTransform)
|
|
419
445
|
|
|
446
|
+
app.add_lexer("lua", LuaLexer)
|
|
447
|
+
|
|
420
448
|
app.add_css_file("lua.css")
|
|
421
449
|
|
|
422
450
|
return {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '3.
|
|
21
|
-
__version_tuple__ = version_tuple = (3,
|
|
31
|
+
__version__ = version = '3.1.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 1, 0)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = 'g26ca4bce6'
|
|
@@ -25,7 +25,7 @@ from sphinx.roles import XRefRole
|
|
|
25
25
|
from sphinx.util import logging
|
|
26
26
|
from sphinx.util.docfields import TypedField
|
|
27
27
|
from sphinx.util.docutils import SphinxDirective
|
|
28
|
-
from sphinx.util.nodes import make_refnode
|
|
28
|
+
from sphinx.util.nodes import make_id, make_refnode
|
|
29
29
|
|
|
30
30
|
from sphinx_lua_ls import utils
|
|
31
31
|
|
|
@@ -39,8 +39,13 @@ logger = logging.getLogger("sphinx_lua_ls")
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class _SigWriter:
|
|
42
|
-
def __init__(
|
|
42
|
+
def __init__(
|
|
43
|
+
self,
|
|
44
|
+
signode: addnodes.desc_signature,
|
|
45
|
+
maximum_signature_line_length: int | None,
|
|
46
|
+
) -> None:
|
|
43
47
|
self._signode = signode
|
|
48
|
+
self._maximum_signature_line_length = maximum_signature_line_length
|
|
44
49
|
signode["is_multiline"] = True
|
|
45
50
|
|
|
46
51
|
self._line = addnodes.desc_signature_line(add_permalink=True)
|
|
@@ -98,7 +103,10 @@ class _SigWriter:
|
|
|
98
103
|
estimated_len = sum(
|
|
99
104
|
len(p[0]) + len(p[1]) + (1 if p[0] and p[1] else 0) for p in params
|
|
100
105
|
) + len(params)
|
|
101
|
-
multiline =
|
|
106
|
+
multiline = (
|
|
107
|
+
self._maximum_signature_line_length is not None
|
|
108
|
+
and estimated_len > self._maximum_signature_line_length
|
|
109
|
+
)
|
|
102
110
|
|
|
103
111
|
if multiline and not parens:
|
|
104
112
|
parens = ("(", ")")
|
|
@@ -140,7 +148,10 @@ class _SigWriter:
|
|
|
140
148
|
inliner,
|
|
141
149
|
):
|
|
142
150
|
estimated_len = sum(len(p) for p in params) + len(params)
|
|
143
|
-
multiline =
|
|
151
|
+
multiline = (
|
|
152
|
+
self._maximum_signature_line_length is not None
|
|
153
|
+
and estimated_len > self._maximum_signature_line_length
|
|
154
|
+
)
|
|
144
155
|
|
|
145
156
|
if multiline and not parens:
|
|
146
157
|
parens = ("(", ")")
|
|
@@ -422,10 +433,10 @@ class LuaObject(
|
|
|
422
433
|
signode: addnodes.desc_signature,
|
|
423
434
|
) -> None:
|
|
424
435
|
fullname, modname, classname, objname = name
|
|
425
|
-
|
|
426
|
-
if
|
|
427
|
-
signode["names"].append(
|
|
428
|
-
signode["ids"].append(
|
|
436
|
+
id = make_id(self.env, self.state.document, "lua", fullname)
|
|
437
|
+
if id not in self.state.document.ids:
|
|
438
|
+
signode["names"].append(id)
|
|
439
|
+
signode["ids"].append(id)
|
|
429
440
|
signode["first"] = not self.names
|
|
430
441
|
self.state.document.note_explicit_target(signode)
|
|
431
442
|
|
|
@@ -446,6 +457,7 @@ class LuaObject(
|
|
|
446
457
|
docname=self.env.docname,
|
|
447
458
|
objtype=self.objtype,
|
|
448
459
|
deprecated="deprecated" in self.options,
|
|
460
|
+
id=id,
|
|
449
461
|
synopsis=self.options.get("synopsis", None),
|
|
450
462
|
)
|
|
451
463
|
|
|
@@ -503,9 +515,7 @@ class LuaObject(
|
|
|
503
515
|
if "no-index-entry" not in self.options:
|
|
504
516
|
indextext = self.get_index_text(fullname, modname, classname, objname)
|
|
505
517
|
if indextext:
|
|
506
|
-
self.indexnode["entries"].append(
|
|
507
|
-
("single", indextext, anchor, "", None)
|
|
508
|
-
)
|
|
518
|
+
self.indexnode["entries"].append(("single", indextext, id, "", None))
|
|
509
519
|
|
|
510
520
|
def _object_hierarchy_parts(
|
|
511
521
|
self, sig_node: addnodes.desc_signature
|
|
@@ -549,6 +559,10 @@ class LuaObject(
|
|
|
549
559
|
if self.names and self.allow_nesting:
|
|
550
560
|
self.pop_context()
|
|
551
561
|
|
|
562
|
+
@property
|
|
563
|
+
def maximum_signature_line_length(self) -> int | None:
|
|
564
|
+
return self.env.domaindata["lua"]["config"]["maximum_signature_line_length"]
|
|
565
|
+
|
|
552
566
|
|
|
553
567
|
class LuaFunction(
|
|
554
568
|
LuaObject[
|
|
@@ -599,7 +613,7 @@ class LuaFunction(
|
|
|
599
613
|
(generics, args, returns),
|
|
600
614
|
) = self.handle_signature_prefix(sig, signode)
|
|
601
615
|
|
|
602
|
-
sw = _SigWriter(signode)
|
|
616
|
+
sw = _SigWriter(signode, self.maximum_signature_line_length)
|
|
603
617
|
|
|
604
618
|
if generics:
|
|
605
619
|
sw.params(generics, ("<", ">"), False, self.state.inliner)
|
|
@@ -662,7 +676,7 @@ class LuaData(LuaObject[str]):
|
|
|
662
676
|
sig, signode
|
|
663
677
|
)
|
|
664
678
|
|
|
665
|
-
sw = _SigWriter(signode)
|
|
679
|
+
sw = _SigWriter(signode, self.maximum_signature_line_length)
|
|
666
680
|
|
|
667
681
|
if typ:
|
|
668
682
|
sw.punctuation(":")
|
|
@@ -719,7 +733,7 @@ class LuaAlias(LuaObject[tuple[list[tuple[str, str]], str]]):
|
|
|
719
733
|
(generics, typ),
|
|
720
734
|
) = self.handle_signature_prefix(sig, signode)
|
|
721
735
|
|
|
722
|
-
sw = _SigWriter(signode)
|
|
736
|
+
sw = _SigWriter(signode, self.maximum_signature_line_length)
|
|
723
737
|
|
|
724
738
|
if generics:
|
|
725
739
|
sw.params(generics, ("<", ">"), False, self.state.inliner)
|
|
@@ -815,7 +829,7 @@ class LuaClass(
|
|
|
815
829
|
(generics, bases, params, returns),
|
|
816
830
|
) = self.handle_signature_prefix(sig, signode)
|
|
817
831
|
|
|
818
|
-
sw = _SigWriter(signode)
|
|
832
|
+
sw = _SigWriter(signode, self.maximum_signature_line_length)
|
|
819
833
|
|
|
820
834
|
if generics:
|
|
821
835
|
sw.params(generics, ("<", ">"), False, self.state.inliner)
|
|
@@ -962,10 +976,14 @@ class LuaModule(SphinxDirective):
|
|
|
962
976
|
"use :no-index: for one of them",
|
|
963
977
|
line=self.lineno,
|
|
964
978
|
)
|
|
979
|
+
|
|
980
|
+
id = make_id(self.env, self.state.document, "lua", fullname)
|
|
981
|
+
|
|
965
982
|
objects[fullname] = LuaDomain.ObjectEntry(
|
|
966
983
|
docname=self.env.docname,
|
|
967
984
|
objtype="module",
|
|
968
985
|
deprecated="deprecated" in self.options,
|
|
986
|
+
id=id,
|
|
969
987
|
synopsis=self.options.get("synopsis", None),
|
|
970
988
|
)
|
|
971
989
|
|
|
@@ -1002,17 +1020,13 @@ class LuaModule(SphinxDirective):
|
|
|
1002
1020
|
LuaDomain.Entry(fullname=fullname, docname=self.env.docname)
|
|
1003
1021
|
)
|
|
1004
1022
|
|
|
1005
|
-
target_node = nodes.target(
|
|
1006
|
-
"", "", ids=[utils.make_anchor(fullname)], ismod=True
|
|
1007
|
-
)
|
|
1023
|
+
target_node = nodes.target("", "", ids=[id], ismod=True)
|
|
1008
1024
|
self.state.document.note_explicit_target(target_node)
|
|
1009
1025
|
# the platform and synopsis aren't printed; in fact, they are only
|
|
1010
1026
|
# used in the modindex currently
|
|
1011
1027
|
ret.append(target_node)
|
|
1012
1028
|
indextext = _("%s (module)") % fullname
|
|
1013
|
-
inode = addnodes.index(
|
|
1014
|
-
entries=[("single", indextext, utils.make_anchor(fullname), "", None)]
|
|
1015
|
-
)
|
|
1029
|
+
inode = addnodes.index(entries=[("single", indextext, id, "", None)])
|
|
1016
1030
|
ret.append(inode)
|
|
1017
1031
|
return ret
|
|
1018
1032
|
|
|
@@ -1079,18 +1093,18 @@ class LuaDomain(Domain):
|
|
|
1079
1093
|
name = "lua"
|
|
1080
1094
|
label = "Lua"
|
|
1081
1095
|
object_types: dict[str, ObjType] = {
|
|
1082
|
-
"function": ObjType(_("function"), "func", "obj", "lua"),
|
|
1083
|
-
"data": ObjType(_("data"), "data", "obj", "lua"),
|
|
1084
|
-
"const": ObjType(_("const"), "attr", "const", "obj", "lua"),
|
|
1085
|
-
"class": ObjType(_("class"), "class", "obj", "lua"),
|
|
1086
|
-
"alias": ObjType(_("alias"), "alias", "obj", "lua"),
|
|
1087
|
-
"enum": ObjType(_("enum"), "enum", "obj", "lua"),
|
|
1088
|
-
"method": ObjType(_("method"), "meth", "obj", "lua"),
|
|
1089
|
-
"classmethod": ObjType(_("class method"), "meth", "obj", "lua"),
|
|
1090
|
-
"staticmethod": ObjType(_("static method"), "meth", "obj", "lua"),
|
|
1091
|
-
"attribute": ObjType(_("attribute"), "attr", "obj", "lua"),
|
|
1092
|
-
"table": ObjType(_("data"), "attr", "data", "obj", "lua"),
|
|
1093
|
-
"module": ObjType(_("module"), "mod", "obj", "lua"),
|
|
1096
|
+
"function": ObjType(_("function"), "func", "obj", "lua", "_auto"),
|
|
1097
|
+
"data": ObjType(_("data"), "data", "obj", "lua", "_auto"),
|
|
1098
|
+
"const": ObjType(_("const"), "attr", "const", "obj", "lua", "_auto"),
|
|
1099
|
+
"class": ObjType(_("class"), "class", "obj", "lua", "_auto"),
|
|
1100
|
+
"alias": ObjType(_("alias"), "alias", "obj", "lua", "_auto"),
|
|
1101
|
+
"enum": ObjType(_("enum"), "enum", "obj", "lua", "_auto"),
|
|
1102
|
+
"method": ObjType(_("method"), "meth", "obj", "lua", "_auto"),
|
|
1103
|
+
"classmethod": ObjType(_("class method"), "meth", "obj", "lua", "_auto"),
|
|
1104
|
+
"staticmethod": ObjType(_("static method"), "meth", "obj", "lua", "_auto"),
|
|
1105
|
+
"attribute": ObjType(_("attribute"), "attr", "obj", "lua", "_auto"),
|
|
1106
|
+
"table": ObjType(_("data"), "attr", "data", "obj", "lua", "_auto"),
|
|
1107
|
+
"module": ObjType(_("module"), "mod", "obj", "lua", "_auto"),
|
|
1094
1108
|
}
|
|
1095
1109
|
|
|
1096
1110
|
directives = {
|
|
@@ -1120,6 +1134,7 @@ class LuaDomain(Domain):
|
|
|
1120
1134
|
"mod": LuaXRefRole(),
|
|
1121
1135
|
"obj": LuaXRefRole(),
|
|
1122
1136
|
"lua": LuaXRefRole(),
|
|
1137
|
+
"_auto": LuaXRefRole(),
|
|
1123
1138
|
}
|
|
1124
1139
|
|
|
1125
1140
|
@dataclass(slots=True)
|
|
@@ -1127,6 +1142,7 @@ class LuaDomain(Domain):
|
|
|
1127
1142
|
docname: str
|
|
1128
1143
|
objtype: str
|
|
1129
1144
|
deprecated: bool
|
|
1145
|
+
id: str
|
|
1130
1146
|
synopsis: str | None
|
|
1131
1147
|
|
|
1132
1148
|
@dataclass(slots=True)
|
|
@@ -1320,7 +1336,7 @@ class LuaDomain(Domain):
|
|
|
1320
1336
|
builder,
|
|
1321
1337
|
fromdocname,
|
|
1322
1338
|
data.docname,
|
|
1323
|
-
|
|
1339
|
+
data.id,
|
|
1324
1340
|
contnode,
|
|
1325
1341
|
name,
|
|
1326
1342
|
)
|
|
@@ -1347,7 +1363,7 @@ class LuaDomain(Domain):
|
|
|
1347
1363
|
builder,
|
|
1348
1364
|
fromdocname,
|
|
1349
1365
|
data.docname,
|
|
1350
|
-
|
|
1366
|
+
data.id,
|
|
1351
1367
|
contnode,
|
|
1352
1368
|
name,
|
|
1353
1369
|
),
|
|
@@ -446,6 +446,7 @@ def _check_version(
|
|
|
446
446
|
system_version_text,
|
|
447
447
|
type="lua-ls",
|
|
448
448
|
)
|
|
449
|
+
return False, system_version_text
|
|
449
450
|
except (subprocess.SubprocessError, OSError, UnicodeDecodeError):
|
|
450
451
|
_logger.debug(
|
|
451
452
|
"%s failed to print its version", bin_path, exc_info=True, type="lua-ls"
|
|
@@ -484,6 +485,16 @@ def _check_and_install(
|
|
|
484
485
|
type="lua-ls",
|
|
485
486
|
)
|
|
486
487
|
return pathlib.Path(system_bin_path).expanduser().resolve(), path
|
|
488
|
+
elif not install and system_version == "<Unknown>":
|
|
489
|
+
_logger.warning(
|
|
490
|
+
"found %s at %s, but its version is %r; "
|
|
491
|
+
"trying to use it anyway because lua_ls_auto_install=False",
|
|
492
|
+
bin_name,
|
|
493
|
+
system_bin_path,
|
|
494
|
+
system_version,
|
|
495
|
+
type="lua-ls",
|
|
496
|
+
)
|
|
497
|
+
return pathlib.Path(system_bin_path).expanduser().resolve(), path
|
|
487
498
|
else:
|
|
488
499
|
_logger.debug("pre-installed %s not found", bin_name, type="lua-ls")
|
|
489
500
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from pygments.lexer import bygroups, inherit
|
|
2
|
+
from pygments.lexers.scripting import LuaLexer as _LuaLexer # type: ignore
|
|
3
|
+
from pygments.token import * # type: ignore
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class LuaLexer(_LuaLexer):
|
|
7
|
+
tokens = {
|
|
8
|
+
"ws": [
|
|
9
|
+
(
|
|
10
|
+
r"(--\[(?P<level>=*)\[\s*)(@\w+)(.*?\](?P=level)\])",
|
|
11
|
+
bygroups(
|
|
12
|
+
Comment.Multiline, None, Keyword.Comment, Comment.Multiline, None
|
|
13
|
+
),
|
|
14
|
+
),
|
|
15
|
+
(
|
|
16
|
+
r"(---\s*)(@\w+)(.*)$",
|
|
17
|
+
bygroups(Comment.Multiline, Keyword.Comment, Comment.Multiline),
|
|
18
|
+
),
|
|
19
|
+
inherit,
|
|
20
|
+
],
|
|
21
|
+
}
|