LuaLS / LuaLS/lua-language-server
New setting to expand identifier / name / word and/or consolidation of constant
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Some Lua based domain specific languages use an extended character set for identifiers, this is easily achieved by modifying e.g. alnum in luaconf.h, similar in LuaJIT and also is adjustable through compact modifications in ZeroBrane.
In Sumneko it was easy to modify as well until recently (through parser/grammar.lua), but with the latest patch the definition of which characters an identifier/word/lua-name represents is all over the place.
- newparser.lua - CharMapWord,
- grammar.lua - defs.NameBody
- luadoc.lua - name
- tokens.lua - Word
As sample e.g. adding support for $ and @ characters in the identifiers: \x24-\x24 and \x40-\x40 or the single character versions are added to the listings.
It would be better to have a extension setting where this can be listed, or alternatively at least a single file where this is defined as constant (similar to how its able to be overridden/extended through luaconf.h)
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先比較 newparser.lua、grammar.lua、luadoc.lua 和 tokens.lua 中的識別碼定義,尤其是 CharMapWord、defs.NameBody、name 和 Word。確定所要求的擴充設定或共用常數是否可以涵蓋這四處,然後驗證 $ 和 @ 等字元是否能被一致地識別。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100