LuaLS / lua.tmbundle

TextMate support for Lua
MIT License
7 stars 5 forks source link

Support for LDoc/Luadoc #1

Closed ghost closed 1 year ago

ghost commented 2 years ago
sumneko commented 1 year ago

As far as I know, the rules of LDoc have many conflicts with EmmyLua, and I don't understand its detailed rules. Can you make a PR?

zm-cttae-archive commented 1 year ago

I personally think someone should roll their own story of a first-class Lua documentation system.
This would have syntax and functionality matching JSDoc, and a taglet API to generate documentation data in JSON.

Sainan commented 1 year ago

I don't see why you give such a big laundry list, when all that's really needed is classifying the @-thingies as entity.name.tag.documentation, right?

image

This can be achieved by adding the following to comment.line.double-dash.lua:

<key>patterns</key>
<array>
    <dict>
        <key>match</key>
        <string>\@(param|see|comment|usage|return|field|author|set|class|name|pragma|alias|copyright|summary|description|release|license|fixme|todo|warning|raise|charset|within|local|export|private|constructor|static|include|module|script|example|topic|submodule|classmod|file|function|lfunction|table|section|type|annotation|factory)</string>
        <key>name</key>
        <string>entity.name.tag.documentation.lua</string>
    </dict>
</array>
zm-cttae commented 1 year ago

Fixed in #10, needs closing. :)