LuaLS / LuaLS/lua-language-server
Setting up `codestyle-check` precisely?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi there!
Is there any way to set up (disable) exact checks for codestyle-check?
.stylua.toml and .editorconfig syntax doesn't have much parameters, and doesn't cover such usecases like "spaces before single argument".
For example, when I type local a = require"foo".moo, and I don't want that codestyle checker triggered on missing space (or anything) here, and I want this "globally" (to don't place comments ---@diagnostic comments here and there and everywhere everytime).
Or, say, I have function, that takes a table as argument, and place table global in metadate, to allow OOP-like calls on tables.
So, as syntactig sugar I have variable T set to this function.
So, I'm initializing tables with local mytable = T{}.
And I don't want that codestyle-checker blame on missing space here too.
And so on...
So, it would be nice, if there was a possibility to configure (enable/disable) exact checks per-project and globally (default settings, that per-project ones would override).
And I digged all around lua_ls and emmylua docs and didn't find a way to do that.
Can you advice me, please?
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 zu prüfen, wie codestyle-check mit .stylua.toml und .editorconfig zusammenhängt, und sieh dir anschließend die in der Issue erwähnte lua_ls- und emmylua-Dokumentation an. Eine vollständige Änderung würde projektweite und globale Einstellungen definieren, mit denen einzelne Checks aktiviert oder deaktiviert werden können, wobei Projekteinstellungen die Standardwerte überschreiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100