CppCXY / EmmyLuaCodeStyle

fast, powerful, and feature-rich Lua formatting and checking tool.
MIT License
140 stars 27 forks source link

[Feature request] Fluent configuration of whitespace insertion #74

Closed ArmoredPony closed 1 year ago

ArmoredPony commented 1 year ago

Currently we have table_append_expression_no_space option that allows + operator not to be wrapped with spaces in statements like t[#t+1]. It would be nice to have more configurable space insertion For example, don't insert spaces around math operators i^2+1 or exponentiation operator in particular i^2 + 1, don't insert spaces in expression in square brackets t[i+1], don't insert spaces in numeric for ranges for i = 1,7,2 and between multiple variables and/or values in general

a,b = 1,2
for k,v in next,t do print(k,v) end

Can any of these please be done? I usually use your language server to format lua code that after is pasted into another application, and since that application has not much space for code I try to write as compact as possible.

CppCXY commented 1 year ago

all this can be done after I complete refactor, and after a few versions I will support the plugin. Need to wait some time