Closed romgrk closed 1 year ago
Got it.
I was doing foo'bar'
because that's how the project had been doing require
s when I started contributing— should I wrap those in parens too?
For autoformatter, stylua
or lua_ls
might be a ble to do it.
I was doing foo'bar' because that's how the project had been doing requires when I started contributing— should I wrap those in parens too?
Oh yeah I might have been inconsistent :|
No need to reformat code now, but just for new code, and we can reformat in one go if we set up a linter.
Apparently the lua language server integrates with editorconfig. We can add the options they list to the one in our repo
I added an EmmyLua configuration. If it doesn't format how you prefer, feel free to edit it! I took a look at the code in the project as it is and made my best guesses as to what the config should be.
In a followup PR (after pinned tabs preferably, to prevent more conflicts) we can format all of the files 🙂
Not all of the options in EmmyLua seem to apply. I have reported the issue upstream. Re-opening for now until it's solved.
I believe I've found the issue. Sometimes a lua/.luarc.json
file gets created and that interferes with the editorconfig loading.
@Iron-E hi, sorry to push this but I like my formatting a certain way, and I'm going to abuse my power here:
{ key = value }
not{key = value}
get_option('column')
notget_option'column'
I find these more readable :) If we find an autoformatter that we can configure to lint stuff for us we can enable it.