LuaLS / LuaLS/LuaLS.github.io

Improve readability of annotation syntaxes

Open
#7 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
MDX
Stars
10
Forks
19
PR merge metrics
No merged PRs in 30d

Description

The [method currently used](http://localhost:3000/wiki/annotations/#understanding-this-page) for describing how to use annotations can be easy to understand at times:
`---@type `

And also impossible for mere mortals to understand:
`---@cast [+|-][, [+|-]...]`
`---@overload fun([param: type[, param: type...]]): [return_value[,return_value]]`

There must be a better way to represent these more complex syntaxes while also not using symbols regularly in use (`<`, `>`, `(`, `)`, `[`, `]`, `{`, `}`, `@`, `#`, `-`, `+`, `=`, `:`, `"`, `,`, `.`, `?`). Although now that I have listed some in-use symbols, I realize we really are quite limited. It is hard to explain a syntax that uses many symbols… using symbols.

I'm open to any suggestions on how this can be improved 🙂

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 linked annotations/#understanding-this-page page and review the complex syntax examples shown in the issue. The issue does not define a preferred replacement or a clear completion test; done would require an agreed, more readable notation and updated documentation examples.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.