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

VSCode extension does not honor .editorconfig path overrides #864

Closed
zarillion opened this issue Jun 5, 2024 · 3 comments · Fixed by #913
Closed

VSCode extension does not honor .editorconfig path overrides #864

zarillion opened this issue Jun 5, 2024 · 3 comments · Fixed by #913
Labels
bug Something isn't working extension Concerns the VSCode extension

Comments

@zarillion
Copy link

We're looking at moving from lua-format to StyLua for our project and have encountered a hurdle. Our project contains a number of localization files where we like to remove the column limit to prevent wrapping. This leaves it up to the translators how they want to format their translations.

I did not see a way to apply path-specific settings using .stylua.toml, so we have this .editorconfig file:

[*.lua]
max_line_length = 120

[**/localization/**.lua]
max_line_length = 1000

When running stylua directly, ec4rs picks up this override and the configuration is honored. However, when formatted on save in VSCode using the extension, the max_line_length override is not honored.

Is there a way to set up the .editorconfig files such that the editor picks up this override as well? I assume the editor may just be passing the file name and contents to StyLua, so the path-specific section is not picked up on save.

@JohnnyMorganz JohnnyMorganz added bug Something isn't working extension Concerns the VSCode extension labels Jun 5, 2024
@zarillion
Copy link
Author

Just wanted to post an update! With the new WoW expansion we've released a new plugin and we're still very much interested in this feature for swapping formatters!

@JohnnyMorganz
Copy link
Owner

So sorry for the delay here. I think #913 should solve this issue

@JohnnyMorganz
Copy link
Owner

I've just released v1.7.0 for the extension which should have those fixes. Let me know if have any issues with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension Concerns the VSCode extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants