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

Honor .formatter.exs line_length in editor.ruler #395

Closed
TheFirstAvenger opened this issue Dec 1, 2023 · 4 comments
Closed

Honor .formatter.exs line_length in editor.ruler #395

TheFirstAvenger opened this issue Dec 1, 2023 · 4 comments

Comments

@TheFirstAvenger
Copy link

TheFirstAvenger commented Dec 1, 2023

Is it possible to read the .formatter.exs line_length property and use that to override the edtior.rulers value in VSCode for that project, making the vertical line length indicator always accurate to the current project? If it is not present in that file, then the formatter default of 98 should be applied.

@lukaszsamson
Copy link
Collaborator

Interesting idea. This would require evaluating Mix.Tasks.Format.formatter_for_file for each file but we can add a custom LSP command doing that. Do you know which vscode API can override edtior.rulers?

@TheFirstAvenger
Copy link
Author

Hmmm... upon further digging, it looks like there is an open PR for VSCode to support this.

@lukaszsamson
Copy link
Collaborator

Given that the PR is > 2y old and the issue microsoft/vscode#111251 is > 3y old I'm not optimistic this is going to be supported soon

@lukaszsamson lukaszsamson closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2023
@TheFirstAvenger
Copy link
Author

Yeah that makes sense. I will keep an eye on those PRs and if they happen to merge I will revisit this.

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

No branches or pull requests

2 participants