LuaLS / LuaLS/lua-language-server

Setting up `codestyle-check` precisely?

Open
#2,100 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

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?

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 checking how codestyle-check relates to .stylua.toml and .editorconfig, then review the lua_ls and emmylua documentation mentioned in the issue. A complete change would define project-level and global settings for enabling or disabling individual checks, with project settings overriding defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
developer-experience, tooling
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.