-
-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
Labels
feat/formatterRelated to code formatterRelated to code formatter
Description
How are you using the lua-language-server?
Other
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking, Formatting, Other
Expected Behaviour
The ability to have different spacing rules for an array and a "map"-type of table.
I would like to be able to write tables in this manner and it to give me feedback. I personally use space between curlies in map-type of tables, and no space in arrays. I think it would also be nice if an user would define the rule other way around if they want that, since this is just a personal preference. For the time being I can just disable the checking for that rule:
-- The correct way for me:
local map = { foo = 1 }
local arr = {1, 2, 3, 4}
-- I would like this to give me style-check error:
local map = {foo = 1}
local arr = { 1, 2, 3, 4 }
Actual Behaviour
Currently you can only have a space or no space between the curly and the first element in a table regardless if the table is an array or a map.
Reproduction steps
- Set
space_around_table_field_list
to eitherfalse/true
in your.editorconfig
. - Write an array and a map-type of table in differing styles.
- Get yelled at by the style-check.
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
feat/formatterRelated to code formatterRelated to code formatter