sphinx-lua-ls 0.0.4__tar.gz → 1.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-1.1.0/CHANGELOG.md +18 -0
- {sphinx_lua_ls-0.0.4/sphinx_lua_ls.egg-info → sphinx_lua_ls-1.1.0}/PKG-INFO +2 -1
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/source/index.rst +74 -22
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/pyproject.toml +1 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/_version.py +2 -2
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/autodoc.py +163 -152
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/doctree.py +117 -7
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/domain.py +3 -2
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0/sphinx_lua_ls.egg-info}/PKG-INFO +2 -1
- sphinx_lua_ls-1.1.0/sphinx_lua_ls.egg-info/SOURCES.txt +47 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/mod.lua +6 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/src/refs.rst +2 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression/autodoc.html +43 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression/refs.html +11 -0
- sphinx_lua_ls-0.0.4/sphinx_lua_ls.egg-info/SOURCES.txt +0 -85
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/environment.pickle +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/index.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/src/annotations.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/src/autodoc.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/src/directives.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/src/modules.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/doctrees/src/refs.doctree +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/.buildinfo +0 -4
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/index.rst.txt +0 -12
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/src/annotations.rst.txt +0 -16
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/src/autodoc.rst.txt +0 -7
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/src/directives.rst.txt +0 -132
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/src/modules.rst.txt +0 -22
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_sources/src/refs.rst.txt +0 -68
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/alabaster.css +0 -663
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/basic.css +0 -906
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/custom.css +0 -1
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/doctools.js +0 -149
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/documentation_options.js +0 -13
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/file.png +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/github-banner.svg +0 -5
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/language_data.js +0 -191
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/minus.png +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/plus.png +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/pygments.css +0 -84
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/searchtools.js +0 -635
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/_static/sphinx_highlight.js +0 -154
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/genindex.html +0 -356
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/index.html +0 -127
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/lua-modindex.html +0 -148
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/objects.inv +0 -0
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/py-modindex.html +0 -125
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/search.html +0 -125
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/searchindex.js +0 -1
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/src/annotations.html +0 -123
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/src/autodoc.html +0 -228
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/src/directives.html +0 -333
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/src/modules.html +0 -142
- sphinx_lua_ls-0.0.4/test/roots/test-doc/_build/html/src/refs.html +0 -190
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/.github/workflows/ci.yaml +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/.gitignore +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/.pre-commit-config.yaml +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/.vscode/settings.json +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/CONTRIBUTING.md +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/LICENSE +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/README.md +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/conftest.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/Makefile +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/example/logging.lua +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/make.bat +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/source/_extra/robots.txt +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/docs/source/conf.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/setup.cfg +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/__init__.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/intersphinx.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/lua_ls.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls/py.typed +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls.egg-info/dependency_links.txt +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls.egg-info/requires.txt +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/sphinx_lua_ls.egg-info/top_level.txt +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/conftest.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/Makefile +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/conf.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/index.rst +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/make.bat +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/src/annotations.rst +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/src/autodoc.rst +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/src/directives.rst +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/roots/test-doc/src/modules.rst +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_parse.py +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression/annotations.html +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression/directives.html +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression/modules.html +0 -0
- {sphinx_lua_ls-0.0.4 → sphinx_lua_ls-1.1.0}/test/test_regression.py +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v1.1.0
|
|
4
|
+
|
|
5
|
+
- Added support for `!doc` and `!doctype` comments.
|
|
6
|
+
- Added `:include-protected:` and `:include-package:` options for `lua:autoobject`.
|
|
7
|
+
- Allowed referring `lua:const` objects from `lua:attr` role.
|
|
8
|
+
- Fixed a bug when default options would not properly propagate
|
|
9
|
+
when using `lua:autoobject` with `:recurse:`.
|
|
10
|
+
- Fixed a bug when `lua:autoobject` would deduce incorrect module paths
|
|
11
|
+
when applied to non-toplevel modules.
|
|
12
|
+
- Fixed a bug when docstring for a class would be used for undocumented function
|
|
13
|
+
parameters that have this class as their type.
|
|
14
|
+
- Fixed types when `lua:autoobject` would infer incorrect types for `data`.
|
|
15
|
+
|
|
16
|
+
## v1.0.0
|
|
17
|
+
|
|
18
|
+
Initial release.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sphinx-lua-ls
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Automatic documentation generation via LuaLS
|
|
5
5
|
Author-email: Tamika Nomara <taminomara@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -28,6 +28,7 @@ License: MIT License
|
|
|
28
28
|
Project-URL: Documentation, https://taminomara.github.io/sphinx-lua-ls/
|
|
29
29
|
Project-URL: Issues, https://github.com/taminomara/sphinx-lua-ls/issues
|
|
30
30
|
Project-URL: Source, https://github.com/taminomara/sphinx-lua-ls/
|
|
31
|
+
Project-URL: Changelog, https://github.com/taminomara/sphinx-lua-ls/blob/main/CHANGELOG.md
|
|
31
32
|
Classifier: Development Status :: 5 - Production/Stable
|
|
32
33
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
33
34
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -127,6 +127,10 @@ and specify the location of your Lua project:
|
|
|
127
127
|
# relative to the directory with `conf.py`.
|
|
128
128
|
lua_ls_project_root = "../"
|
|
129
129
|
|
|
130
|
+
If you plan to use Markdown in code comments, install the `MySt`_ plugin for Sphinx.
|
|
131
|
+
|
|
132
|
+
.. _MySt: https://myst-parser.readthedocs.io/en/latest/index.html
|
|
133
|
+
|
|
130
134
|
Quickstart
|
|
131
135
|
----------
|
|
132
136
|
|
|
@@ -447,36 +451,49 @@ Autodoc directive
|
|
|
447
451
|
You can automatically generate documentation for any object by invoking
|
|
448
452
|
the :rst:dir:`lua:autoobject` directive.
|
|
449
453
|
|
|
450
|
-
|
|
454
|
+
Tables are exported as :rst:dir:`data` by default, meaning that their contents
|
|
455
|
+
are not documented.
|
|
451
456
|
|
|
452
|
-
|
|
457
|
+
To enable documentation within a table, document is as a class.
|
|
458
|
+
If you inherit it from `table`, autodoc will treat it as a module.
|
|
459
|
+
Thus, a typical Lua module will look like this:
|
|
453
460
|
|
|
454
|
-
..
|
|
461
|
+
.. code-block:: lua
|
|
455
462
|
|
|
456
|
-
|
|
457
|
-
|
|
463
|
+
--- This is a module. Notice that we've declared it as a class
|
|
464
|
+
--- inherited from :lua:obj:`table`.
|
|
465
|
+
---
|
|
466
|
+
--- @class library: table
|
|
467
|
+
local library = {}
|
|
458
468
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
469
|
+
--- Submodules should also be declared as classes.
|
|
470
|
+
---
|
|
471
|
+
--- @class library.submodule: table
|
|
472
|
+
library.submodule = {}
|
|
462
473
|
|
|
463
|
-
|
|
474
|
+
--- Other objects are documented as usual.
|
|
475
|
+
function library.foo() end
|
|
464
476
|
|
|
465
|
-
|
|
466
|
-
--- inherited from `table`.
|
|
467
|
-
---
|
|
468
|
-
--- @class library: table
|
|
469
|
-
local library = {}
|
|
477
|
+
return library
|
|
470
478
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
479
|
+
.. note::
|
|
480
|
+
|
|
481
|
+
By default, autodoc will parse object comments as ReStructured Text,
|
|
482
|
+
not as MarkDown. If you plan to use Markdown in code comments,
|
|
483
|
+
install the `MySt`_ plugin for Sphinx and invoke include
|
|
484
|
+
:rst:dir:`lua:autoobject` from a markdown file.
|
|
485
|
+
|
|
486
|
+
Make sure you separate separate comment markers from documentation by a space.
|
|
487
|
+
Otherwise, autodoc will not be able to tell your comments apart from content
|
|
488
|
+
automatically generated by Lua Language Server:
|
|
489
|
+
|
|
490
|
+
.. code-block:: lua
|
|
475
491
|
|
|
476
|
-
---
|
|
477
|
-
|
|
492
|
+
--- This is OK: separated by a space.
|
|
493
|
+
local x = 0;
|
|
478
494
|
|
|
479
|
-
|
|
495
|
+
---This is NOT OK: no separation.
|
|
496
|
+
local x = 0;
|
|
480
497
|
|
|
481
498
|
.. warning::
|
|
482
499
|
|
|
@@ -487,7 +504,7 @@ Autodoc directive
|
|
|
487
504
|
|
|
488
505
|
2. ``@deprecated`` markers do not add any note to the documentation.
|
|
489
506
|
We recommend providing an explicit message
|
|
490
|
-
with the
|
|
507
|
+
with the `deprecated` directive.
|
|
491
508
|
|
|
492
509
|
3. ``@nodiscard`` and ``@operator`` markers are not exported.
|
|
493
510
|
|
|
@@ -522,6 +539,8 @@ Autodoc directive
|
|
|
522
539
|
they are skipped even if :rst:dir:`members` is passed.
|
|
523
540
|
|
|
524
541
|
.. rst:directive:option:: private-members
|
|
542
|
+
protected-members
|
|
543
|
+
package-members
|
|
525
544
|
|
|
526
545
|
Include non-public members to the object's description.
|
|
527
546
|
|
|
@@ -566,6 +585,39 @@ Autodoc directive
|
|
|
566
585
|
for enums (``@enum``). If ordering by source, enums will be placed
|
|
567
586
|
at the end of the documentation.
|
|
568
587
|
|
|
588
|
+
|
|
589
|
+
Controlling generation from code comments
|
|
590
|
+
-----------------------------------------
|
|
591
|
+
|
|
592
|
+
When using :rst:dir:`lua:autoobject` in recursive mode, it is sometimes necessary
|
|
593
|
+
to override its options for some objects. To do this, you can include specially
|
|
594
|
+
formatted comments to your documentation.
|
|
595
|
+
|
|
596
|
+
To override any :rst:dir:`lua:autoobject` setting for a particular object,
|
|
597
|
+
use ``!doc`` comments. For example, here we enable :rst:dir:`lua:autoobject:special-members`
|
|
598
|
+
and exclude ``__tostring`` for class ``Foo``:
|
|
599
|
+
|
|
600
|
+
.. code-block:: lua
|
|
601
|
+
|
|
602
|
+
--- Some class documentation...
|
|
603
|
+
---
|
|
604
|
+
--- !doc special-members
|
|
605
|
+
--- !doc exclude-members: __tostring
|
|
606
|
+
--- @class Foo
|
|
607
|
+
|
|
608
|
+
You can also specify which type of object is being documented by using
|
|
609
|
+
a ``!doctype`` comment. For example, here we use ``!doctype const`` to indicate
|
|
610
|
+
that a certain variable should be documented as :rst:dir:`lua:const`:
|
|
611
|
+
|
|
612
|
+
.. code-block:: lua
|
|
613
|
+
|
|
614
|
+
--- Some const documentation...
|
|
615
|
+
---
|
|
616
|
+
--- !doctype const
|
|
617
|
+
--- @type string
|
|
618
|
+
foo = "bar!"
|
|
619
|
+
|
|
620
|
+
|
|
569
621
|
Settings
|
|
570
622
|
--------
|
|
571
623
|
|
|
@@ -55,6 +55,7 @@ doc = [
|
|
|
55
55
|
Documentation = "https://taminomara.github.io/sphinx-lua-ls/"
|
|
56
56
|
Issues = "https://github.com/taminomara/sphinx-lua-ls/issues"
|
|
57
57
|
Source = "https://github.com/taminomara/sphinx-lua-ls/"
|
|
58
|
+
Changelog = "https://github.com/taminomara/sphinx-lua-ls/blob/main/CHANGELOG.md"
|
|
58
59
|
|
|
59
60
|
[build-system]
|
|
60
61
|
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel>=0.40"]
|