LuaLS / LuaLS/lua-language-server

[Request] Enum bitfield?

Open
#1,876 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

---@enum eStopFlags bitfield
eStopFlags = {
    STP_PHYSICAL_OBJECTS = 1,
    STP_NONPHYSICAL_OBJECTS = 2,
    STP_PLAYER = 4,
    STP_UPDATE = 8,
    STP_PHYSICS = 16,
} 
if g_StopFlags & (eStopFlags.STP_PHYSICAL_OBJECTS | eStopFlags.STP_UPDATE) then
    print("Can't update physical objects")
end

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 by reviewing the enum and bitfield example in the issue, then locate the language server's handling of @enum annotations and expression operators. Done should mean the example is recognized and receives appropriate language-server support, with tests covering the bitfield enum behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
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.