Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to add call_arg_parenthesis when they are missing #179

Open
NobbZ opened this issue Jun 29, 2024 · 9 comments
Open

add option to add call_arg_parenthesis when they are missing #179

NobbZ opened this issue Jun 29, 2024 · 9 comments

Comments

@NobbZ
Copy link

NobbZ commented Jun 29, 2024

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.

@CppCXY
Copy link
Owner

CppCXY commented Jul 1, 2024

What plugin do you currently use to access EmmyLuaCodeStyle formatting

@CppCXY
Copy link
Owner

CppCXY commented Jul 1, 2024

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

@NobbZ
Copy link
Author

NobbZ commented Jul 1, 2024

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.

@CppCXY
Copy link
Owner

CppCXY commented Jul 1, 2024

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

@NobbZ
Copy link
Author

NobbZ commented Jul 1, 2024

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?

@CppCXY
Copy link
Owner

CppCXY commented Jul 1, 2024

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
Copy link
Owner

CppCXY commented Jul 1, 2024

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.

@NobbZ
Copy link
Author

NobbZ commented Jul 1, 2024

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.

@CppCXY
Copy link
Owner

CppCXY commented Jul 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants