sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
811 stars 80 forks source link

max_line_length-guide is broken #190

Closed florianb closed 1 year ago

florianb commented 7 years ago

Issuehunt badges

..since the usage of the wrap-guide element has changed, and the wrap-guide instance isn't part of the DOM-element anymore.

IssueHunt Summary ### Sponsors (Total: $40.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($40.00) #### [Become a sponsor now!](https://issuehunt.io/r/sindresorhus/atom-editorconfig/issues/190) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/sindresorhus/atom-editorconfig/issues/190) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/sindresorhus/atom-editorconfig/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
florianb commented 7 years ago

Okaydo - i fiddled around a lot and we're not able to intercept the wrap-guide anymore. I will implement a custom max-line-length element to the package. This will land hopefully this week.

As always help is welcome and i'd be thankful if anybody would try to create it.

ameenross commented 7 years ago

Any news on this? I was just trying out the max_line_length and didn't notice any difference. Then I found this issue.

manuelbieh commented 6 years ago

If, by "broken", you mean Atom does not respect the max_line_length setting to adjust the long line guide accordingly I still have that problem. Not sure if it ever worked but I left the Preferred Line Length setting in Atom untouched (defaults to 80) and usually set max_line_length in my .editorconfig to 100 but the guide is still at 80.

Is it because I don't have soft wrap enabled or does anybody have an idea how I can move the guide to that 100 mark?

ameenross commented 6 years ago

the guide is still at 80

Here's the answer:

we're not able to intercept the wrap-guide anymore

My question was i.r.t. this statement:

I will implement a custom max-line-length element to the package. This will land hopefully this week.

florianb commented 6 years ago

Hi @ameenross, @manuelbieh - thanks for getting in touch. I started rewriting the package in order to fix this issue. Unfortunately i'm currently not making much progress since the lack of time. I'd like to give you news on this but it seems like you'll still have some patience until the package picks up to the current release of Atom again.

florianb commented 5 years ago

I decided to drop maintenance. Sorry.

See https://github.com/sindresorhus/atom-editorconfig/issues/231

Alhadis commented 5 years ago

This should have been fixed by 021d0ea. See related issues #232 and #226.

Gonna close this as resolved; if any of you experience this again, don't hesitate to open a new issue. πŸ‘

ameenross commented 5 years ago

Thanks for taking over this project! What version of Atom do we need for this to work? I'm not seeing it yet.

Alhadis commented 5 years ago

@ameenross I tested this with the latest Atom Nightly (1.37.0-nightly0) as well as stable (1.34.0). Could you provide a list of which packages you have installed/activated? It's possible there's something screwing with the package (as usual…)

ameenross commented 5 years ago

@Alhadis

Built-in Atom Packages (93)
β”œβ”€β”€ atom-dark-syntax@0.29.1
β”œβ”€β”€ atom-dark-ui@0.53.3
β”œβ”€β”€ atom-light-syntax@0.29.1
β”œβ”€β”€ atom-light-ui@0.46.3
β”œβ”€β”€ base16-tomorrow-dark-theme@1.6.0
β”œβ”€β”€ base16-tomorrow-light-theme@1.6.0
β”œβ”€β”€ one-dark-ui@1.12.5
β”œβ”€β”€ one-light-ui@1.12.5
β”œβ”€β”€ one-dark-syntax@1.8.4
β”œβ”€β”€ one-light-syntax@1.8.4
β”œβ”€β”€ solarized-dark-syntax@1.3.0
β”œβ”€β”€ solarized-light-syntax@1.3.0
β”œβ”€β”€ about@1.9.1
β”œβ”€β”€ archive-view@0.65.1
β”œβ”€β”€ autocomplete-atom-api@0.10.7
β”œβ”€β”€ autocomplete-css@0.17.5
β”œβ”€β”€ autocomplete-html@0.8.8
β”œβ”€β”€ autocomplete-plus@2.42.0
β”œβ”€β”€ autocomplete-snippets@1.12.0
β”œβ”€β”€ autoflow@0.29.4
β”œβ”€β”€ autosave@0.24.6
β”œβ”€β”€ background-tips@0.28.0
β”œβ”€β”€ bookmarks@0.45.1
β”œβ”€β”€ bracket-matcher@0.90.4
β”œβ”€β”€ command-palette@0.43.5
β”œβ”€β”€ dalek@0.2.2
β”œβ”€β”€ deprecation-cop@0.56.9
β”œβ”€β”€ dev-live-reload@0.48.1
β”œβ”€β”€ encoding-selector@0.23.9
β”œβ”€β”€ exception-reporting@0.43.1
β”œβ”€β”€ find-and-replace@0.215.14
β”œβ”€β”€ fuzzy-finder@1.8.2
β”œβ”€β”€ github@0.23.3
β”œβ”€β”€ git-diff@1.3.9
β”œβ”€β”€ go-to-line@0.33.0
β”œβ”€β”€ grammar-selector@0.50.1
β”œβ”€β”€ image-view@0.63.1
β”œβ”€β”€ incompatible-packages@0.27.3
β”œβ”€β”€ keybinding-resolver@0.38.4
β”œβ”€β”€ line-ending-selector@0.7.7
β”œβ”€β”€ link@0.31.6
β”œβ”€β”€ markdown-preview@0.159.25
β”œβ”€β”€ metrics@1.6.2
β”œβ”€β”€ notifications@0.70.5
β”œβ”€β”€ open-on-github@1.3.1
β”œβ”€β”€ package-generator@1.3.0
β”œβ”€β”€ settings-view@0.257.2
β”œβ”€β”€ snippets@1.4.0
β”œβ”€β”€ spell-check@0.74.2
β”œβ”€β”€ status-bar@1.8.15
β”œβ”€β”€ styleguide@0.49.12
β”œβ”€β”€ symbols-view@0.118.2
β”œβ”€β”€ tabs@0.109.2
β”œβ”€β”€ timecop@0.36.2
β”œβ”€β”€ tree-view@0.224.5
β”œβ”€β”€ update-package-dependencies@0.13.1
β”œβ”€β”€ welcome@0.36.7
β”œβ”€β”€ whitespace@0.37.7 (disabled)
β”œβ”€β”€ wrap-guide@0.40.3
β”œβ”€β”€ language-c@0.60.14
β”œβ”€β”€ language-clojure@0.22.7
β”œβ”€β”€ language-coffee-script@0.49.3
β”œβ”€β”€ language-csharp@1.1.0
β”œβ”€β”€ language-css@0.43.0
β”œβ”€β”€ language-gfm@0.90.6
β”œβ”€β”€ language-git@0.19.1
β”œβ”€β”€ language-go@0.46.6
β”œβ”€β”€ language-html@0.51.5
β”œβ”€β”€ language-hyperlink@0.17.0
β”œβ”€β”€ language-java@0.31.1
β”œβ”€β”€ language-javascript@0.129.19
β”œβ”€β”€ language-json@0.19.2
β”œβ”€β”€ language-less@0.34.3
β”œβ”€β”€ language-make@0.23.0
β”œβ”€β”€ language-mustache@0.14.5
β”œβ”€β”€ language-objective-c@0.15.1
β”œβ”€β”€ language-perl@0.38.1
β”œβ”€β”€ language-php@0.44.1
β”œβ”€β”€ language-property-list@0.9.1
β”œβ”€β”€ language-python@0.51.8
β”œβ”€β”€ language-ruby@0.72.14
β”œβ”€β”€ language-ruby-on-rails@0.25.3
β”œβ”€β”€ language-rust-bundled@0.1.0
β”œβ”€β”€ language-sass@0.62.0
β”œβ”€β”€ language-shellscript@0.27.9
β”œβ”€β”€ language-source@0.9.0
β”œβ”€β”€ language-sql@0.25.10
β”œβ”€β”€ language-text@0.7.4
β”œβ”€β”€ language-todo@0.29.4
β”œβ”€β”€ language-toml@0.18.2
β”œβ”€β”€ language-typescript@0.4.11
β”œβ”€β”€ language-xml@0.35.3
└── language-yaml@0.32.0

Community Packages (16)
β”œβ”€β”€ atom-beautify@0.33.4
β”œβ”€β”€ atom-debug-ui@1.0.4
β”œβ”€β”€ atom-ide-ui@0.13.0
β”œβ”€β”€ atom-minify@0.8.0
β”œβ”€β”€ busy-signal@2.0.0
β”œβ”€β”€ editorconfig@2.3.0
β”œβ”€β”€ git-blame@1.8.0
β”œβ”€β”€ intentions@1.1.5
β”œβ”€β”€ language-blade@0.41.4
β”œβ”€β”€ language-json5@1.1.1
β”œβ”€β”€ merge-conflicts@1.4.5
β”œβ”€β”€ php-debug@0.3.5
β”œβ”€β”€ php-ide-serenata@4.5.1
β”œβ”€β”€ php-twig@4.0.0
β”œβ”€β”€ platformio-ide-terminal@2.9.0
└── project-manager@3.3.6
Alhadis commented 5 years ago

Ah sorry, forgot to mention: Could you include the version of Atom you have installed?

Wouldn't hurt to grab what system you're running too (and the version/distro, if possible).

At a glance, can't see any packages there that look like they'd be troublemakers. πŸ˜•

ameenross commented 5 years ago

Ubuntu 18.04, Atom 1.34.0

Also, disabling all community packages except editorconfig did not make the wrap guide work, it stays at 80 chars

Alhadis commented 5 years ago

Alright, few questions about the workspace:

  1. Is the root folder of the project a Git repository?
  2. What file are you testing this with when you say the wrap-guide isn't working?
  3. What are the rules stored in your .editorconfig file(s)?
ameenross commented 5 years ago

The project is a git repo, editing a PHP file with these rules:

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file and 4-space indentation.
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
max_line_length = 120
Alhadis commented 5 years ago

Alright, what about the file's physical path? Does it reside within one of the project folders, or is it located outside the root directory?

Also, are you seeing this in an editor you had open when the editor was launched? There's currently some bugginess with editors which are open at startup... try closing the file and reopening it. Does that help?

ameenross commented 5 years ago

FWIW, the other properties do work, like indent_size. Just changed it to 6 to test. It's in the root of the project.

I'm working right now, so opening and closing PHP files regularly. Don't see it.

Alhadis commented 5 years ago

Reopening this, as there's (obviously) still an issue here.

Does a max_line_length of less than 80 (e.g., ~30-40) make a difference? Trying to gauge if this issue is connected to atom/wrap-guide#56, which I had to kludge a fix for to stop breakage in nightly releases (#232).

The fix I applied isn't perfect because it doesn't consider multiple guides when updating the position of the wrap-guide. Should open a new issue about that, actually...

ameenross commented 5 years ago

No difference.

Also tried moving ~/.atom for a fresh profile, installing editorconfig and nothing else, still no go.

IssueHuntBot commented 5 years ago

@issuehunt has funded $40.00 to this issue.


ameenross commented 5 years ago

I must admit that I recently saw the length guide starting to work. Maybe a month ago or so.

Might have been version 2.4.0, I'm not sure.

sindresorhus commented 1 year ago

Closing as Atom is abandoned.