LuaLS / LuaLS/lua-language-server
New setting to expand identifier / name / word and/or consolidation of constant
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Identifier-Definitionen in newparser.lua, grammar.lua, luadoc.lua und tokens.lua zu vergleichen, insbesondere CharMapWord, defs.NameBody, name und Word. Bestimme, ob die angeforderte Erweiterungseinstellung oder eine gemeinsame Konstante alle vier Stellen abdecken kann, und überprüfe anschließend, dass Zeichen wie $ und @ konsistent erkannt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100