LuaLS / LuaLS/lua-language-server

How to annotate default arguments to parameters

Open
#2,959 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Is there a standard way to annotate default arguments? I believe in LDoc you can do:

-- @string[opt='gregorian'] calendar optional calendar
-- @int[opt=0] offset optional offset

I'm currently converting some docs over and couldn't find anything in the wiki.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the project's wiki and existing annotation documentation, then compare its supported syntax with the LDoc examples in the issue. Document the standard way to express default arguments, or clarify that the syntax is unsupported, so users converting documentation can determine the correct annotation.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.