question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for max_line_length

See original GitHub issue

Please fill-in this template.

  • I have a question that is specific to this extension; thus, inappropriate for the main EditorConfig issue tracker.
  • I tried running code --disable-extensions and the issue did NOT present itself.

Delete the following condition if it doesn’t apply to your case:

If the extension is not picking up the expected configuration for a file:

  • I tried npm install editorconfig -g and ran editorconfig [file-in-question] and the configuration was what I expected. If not, please file on the editorconfig-core-js issue tracker.

Issue

Visual Studio Code editorconfig-vscode
Version 1.45.1 0.15.1

Root .editorconfig File

root = true

[*.rst]
indent_style = space
indent_size = 3
charset = utf-8
trim_trailing_whitespace = true
max_line_length = 80
insert_final_newline = true

Are there any other relevant .editorconfig files in your project? No

Visual Studio Code Setting Default User Workspace
editor.insertSpaces true ____ ____
editor.tabSize 4 _ _
editor.trimAutoWhitespace true ____ ____
files.autoSave "off" "___" "___"
files.insertFinalNewline false _____ _____
files.trimTrailingWhitespace false _____ _____

File opened

./test.rst

this is a new test of the same thing that I said before it is missing a few words to be trimmed

Expected behavior

max_line_length = 80

Actual behavior

No line was split.

Additional comments or steps to reproduce

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:50
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

37reactions
waldyriouscommented, Nov 25, 2020

I submitted a vscode extension API request for the ability to do that.

Adding a note that the request will need 20 upvotes in the next 60 days to be included in the backlog; otherwise it will be closed.

/cc @userlerueda, @nunocastromartins, @jaileon, @nihaals, @micahjsmith, @peleteiro, @remcohaszing, @Deide, @malobre, @ducakar and @chrislloyd.

12reactions
YarnSpherecommented, Jul 20, 2020

I wouldn’t expect max_line_length to cause this extension to forcefully auto-split my text.

What I would like, however, is for the extension to set the VSCode editor.rulers property so that a ruler would appear at the specified length.

My use-case: I juggle between projects using a maximum line length of 80, 100, and 120; they all use EditorConfig. It would be nice if the ruler was automatically set.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MaxLineLength should allow excluding import and ...
Hey, Another issue i found is MaxLineLength, which is not working, ... We could certainly add a sub-config to the MaxLineLength rule to...
Read more >
How to change max line length for formatter provided by ...
I have the Language Support for Java(TM) by Red Hat extension ... Is it possible to set the formatter to a different max...
Read more >
Max Line Length
Plugin that counts the maximum number of characters across all lines in a text box unlike other plugins that count all characters or...
Read more >
Configuration — flake8 2.5.5 documentation
This is a (likely incomplete) list of settings that can be used in your config file. In general, any settings that pep8 supports...
Read more >
Using Black with other tools - Black 22.12.0 documentation
Please note that Black only supports the TOML file format for its ... to only complain about lines that surpass 88 characters via...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found