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

set soft-wrap enabled by default in markdown files #9018

Closed

Conversation

arcstur
Copy link

@arcstur arcstur commented Dec 6, 2023

closes #8331

dead10ck
dead10ck previously approved these changes Dec 6, 2023
@dead10ck dead10ck self-requested a review December 6, 2023 13:30
@dead10ck
Copy link
Member

dead10ck commented Dec 6, 2023

What is the behavior of overrides with the language setting? If this is set to true by default for markdown, and you toggle the global option off, what wins? I'd still like to be able to toggle it off at runtime.

@dead10ck dead10ck dismissed their stale review December 6, 2023 13:32

Question

@dead10ck
Copy link
Member

dead10ck commented Dec 6, 2023

Just tried it out locally. I can confirm that the language setting always wins. And it goes both ways: even if you set it to false in your own languages.toml, you can't turn it on at runtime either.

This seems like a broader issue that's tangential to this PR, but I'd consider it a blocker for this, unfortunately.

@pascalkuthe
Copy link
Member

What is the behavior of overrides with the language setting? If this is set to true by default for markdown, and you toggle the global option off, what wins? I'd still like to be able to toggle it off at runtime.

The language overwrite wins so this indeed removes the possibility of a runtime toggle.

Stuff like this is what I would like to address with the scope system in #8853

@dead10ck
Copy link
Member

dead10ck commented Dec 6, 2023

Ah, thanks Pascal, somehow that issue flew under my radar. I'll take a read through it when I get some time.

@arcstur
Copy link
Author

arcstur commented Dec 6, 2023

Glad you catched the misbehaviour! I think we can close this, since it's a simple PR, and discuss the config overhaul.

@pascalkuthe
Copy link
Member

Just to expand: You would be able to set config in different scipes lik in kakoune so you could do:

  • :set markdown softwrap.enable false
  • :set buffer softwrap.enable false
  • :set buffer-language softwrap.enable false
  • :set global softwrap.enable false

Each lf these scope are essentially their own full comfig (with the same inheritance rules as we have currently) so even all the first 3 options could be used to disable softwrap for markdown with this PR merged (last option is the same the current set does, the second last option would overwrite the setting for the current buffer and the first two would change the language settings)

@the-mikedavis
Copy link
Member

Yeah let's close this out for now pending the config changes in #8853

@helix-editor helix-editor deleted a comment from Agilan989 Dec 7, 2023
@helix-editor helix-editor deleted a comment from Agilan989 Dec 7, 2023
@arcstur arcstur deleted the feat/soft-wrap-to-markdown branch May 11, 2024 22:48
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

Successfully merging this pull request may close these issues.

set soft-wrap.enable true should be set by default in text-based files
4 participants