LuaLS / LuaLS/lua-language-server

`space_around_table_append_operator` actual effect is inverse of expected in `.editorconfig` in IntelliJ on macOS

Open
#3,281 0 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

How are you using the lua-language-server?

Other

Which OS are you using?

MacOS

What is the issue affecting?

Formatting

Expected Behaviour

space_around_table_append_operator setting to boolean true in .editorconfig expect t[#t + 1] = 1, instead of t[#t+1] = 1.

Actual Behaviour

Inverse occurs. If boolean true, no space is added. If boolean false, space is added.

Reproduction steps
  1. In .editorconfig
  2. Set space_around_table_append_operator = true under [*.lua]
  1. Format a .lua file with:
t[#t+1] = 1
t[#t + 1] = 1

Output is inverse of what is expected:

t[#t+1] = 1
t[#t+1] = 1

Expected:

t[#t + 1] = 1
t[#t + 1] = 1
Additional Notes

No response

Log File

SumnekoLua (3.15.0.46-IDEA243)
I don't know where to get the Sumneko log file on IntelliJ.

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 with the [*.lua] section of the .editorconfig and reproduce formatting in IntelliJ on macOS using the reported Lua file inputs and setting. Trace how space_around_table_append_operator is interpreted, then verify that true and false produce the documented spacing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.