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

indent guides: Respect language specific settings in multibuffers #12528

Merged
merged 9 commits into from
Jun 1, 2024

Conversation

bennetbo
Copy link
Collaborator

@bennetbo bennetbo commented May 31, 2024

Indent guides can be configured per language, meaning that in a multi buffer we can get excerpts where indent guides should be disabled/enabled/styled differently than other excerpts.

Imagine the following scenario, i have indent guides disabled in my settings, but want to enable them for JS and Python. I also want to use a different line width for python files. Something like this is now supported:

image

And the relevant settings for the example above:

"indent_guides": {
  "enabled": false
},
"languages": {
  "JavaScript": {
    "indent_guides": {
      "enabled": true
    }
  },
  "Python": {
    "indent_guides": {
      "enabled": true,
      "line_width": 5
    }
  }
}

Release Notes:

  • Respect language specific settings when showing indent guides in a multibuffer
  • Fixes an issue where indent guide specific settings were not recognized when specified in local settings

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label May 31, 2024
@bennetbo bennetbo merged commit ab8d25e into main Jun 1, 2024
8 checks passed
@bennetbo bennetbo deleted the indent-guide-multibuffer-language-settings-support branch June 1, 2024 18:33
@bennetbo bennetbo mentioned this pull request Jun 2, 2024
1 task
@bennetbo
Copy link
Collaborator Author

bennetbo commented Jun 3, 2024

/cherry-pick v0.138.x

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jun 3, 2024
…2528)

Indent guides can be configured per language, meaning that in a multi
buffer we can get excerpts where indent guides should be
disabled/enabled/styled differently than other excerpts.

Imagine the following scenario, i have indent guides disabled in my
settings, but want to enable them for JS and Python. I also want to use
a different line width for python files. Something like this is now
supported:

<img width="445" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/0c91411c-145c-4210-a883-4c469d5cb828">

And the relevant settings for the example above:
```json
"indent_guides": {
  "enabled": false
},
"languages": {
  "JavaScript": {
    "indent_guides": {
      "enabled": true
    }
  },
  "Python": {
    "indent_guides": {
      "enabled": true,
      "line_width": 5
    }
  }
}
```



Release Notes:

- Respect language specific settings when showing indent guides in a
multibuffer
- Fixes an issue where indent guide specific settings were not
recognized when specified in local settings
bennetbo added a commit that referenced this pull request Jun 3, 2024
…erry-pick #12528) (#12594)

Cherry-picked indent guides: Respect language specific settings in
multibuffers (#12528)

Indent guides can be configured per language, meaning that in a multi
buffer we can get excerpts where indent guides should be
disabled/enabled/styled differently than other excerpts.

Imagine the following scenario, i have indent guides disabled in my
settings, but want to enable them for JS and Python. I also want to use
a different line width for python files. Something like this is now
supported:

<img width="445" alt="image"

src="https://github.com/zed-industries/zed/assets/53836821/0c91411c-145c-4210-a883-4c469d5cb828">

And the relevant settings for the example above:
```json
"indent_guides": {
  "enabled": false
},
"languages": {
  "JavaScript": {
    "indent_guides": {
      "enabled": true
    }
  },
  "Python": {
    "indent_guides": {
      "enabled": true,
      "line_width": 5
    }
  }
}
```



Release Notes:

- Respect language specific settings when showing indent guides in a
multibuffer
- Fixes an issue where indent guide specific settings were not
recognized when specified in local settings

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant