EmmyLuaCodeStyle icon indicating copy to clipboard operation
EmmyLuaCodeStyle copied to clipboard

add option to add `call_arg_parenthesis` when they are missing

Open NobbZ opened this issue 1 year ago • 9 comments

currently call_arg_parentheses seems only to be able to remove parenthesis when they are there. Though it can not add them if they are missing.

As I consider constructs like require"ext".setup{} confusing, I'd prefer if emmy would normalize to always have parenthesis.

NobbZ avatar Jun 29 '24 19:06 NobbZ

What plugin do you currently use to access EmmyLuaCodeStyle formatting

CppCXY avatar Jul 01 '24 01:07 CppCXY

I've added the option call_arg_parentheses=always before, but it's not release

CppCXY avatar Jul 01 '24 01:07 CppCXY

I currently use the CLI (latest release https://github.com/CppCXY/EmmyLuaCodeStyle/tree/1.5.4) as well as lua-ls.

Using a CLI built from source (latest master or certain commit) would be rather trivial for me, though I had no clue how to ensure that lua-ls uses it.

NobbZ avatar Jul 01 '24 05:07 NobbZ

lua-ls is not used through CLI; it is compiled from source and used as a lua-lib.

CppCXY avatar Jul 01 '24 05:07 CppCXY

I expected that much, though it seems as if they even vendor it, as I was unable to find a replaceable reference to this project in my package management.


I checked, they do, I am happy to try to patch it locally.

Can you please confirm that the latest master should have this feature, or is it in some development branch?

NobbZ avatar Jul 01 '24 06:07 NobbZ

Can you please confirm that the latest master should have this feature, or is it in some development branch?

I don't branch unless it's an important update

CppCXY avatar Jul 01 '24 06:07 CppCXY

I have been updating my own language server, so I have been somewhat neglecting updates for this project. If you are interested, you can follow my own language server.

CppCXY avatar Jul 01 '24 06:07 CppCXY

Thanks for pointing that out, though I heavily rely on autogenerated .luarc.jsons to set up the load path correctly. And I do not have the time to spare currently to replace that generator with a generator for another format.

Maybe if your alternative implementation would support loading a .luarc.json I'd be eager to give it a try.

NobbZ avatar Jul 01 '24 06:07 NobbZ

Thanks for pointing that out, though I heavily rely on autogenerated .luarc.jsons to set up the load path correctly. And I do not have the time to spare currently to replace that generator with a generator for another format.

Maybe if your alternative implementation would support loading a .luarc.json I'd be eager to give it a try.

We implement according to the same standards. We will discuss the implementation of many features, but he(sumneko) doesn't have time to update his ls, while I will implement these features. However, I do not directly support reading .luarc.json. Initially, that's what I did, but I found that many settings were unnecessary. Usually, directly copying the .luarc.json configuration to my configuration works just fine.

CppCXY avatar Jul 01 '24 06:07 CppCXY