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

Gutters configuration broken #5694

Closed
non-descriptive opened this issue Jan 26, 2023 · 7 comments · Fixed by #5696
Closed

Gutters configuration broken #5694

non-descriptive opened this issue Jan 26, 2023 · 7 comments · Fixed by #5696
Labels
C-bug Category: This is a bug E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR

Comments

@non-descriptive
Copy link

non-descriptive commented Jan 26, 2023

Summary

Gutter parameters started to yield errors and ignore config parameters.
Removing spaces like was suggested in #2206 doesn't work.

Reproduction Steps

I've update helix to 22.12 (22b3d3d6)

Helix log

there's no data in helix.log written considering the issue
This yielded on start

Bad config: TOML parse error at line 9, column 12
  |
9 | gutters = ["diagnostic", "line_number"]
  |            ^^^^^^^^^^^^
invalid type: string "diagnostic", expected a borrowed string

Same text pops on :config-reload, but it doesn't fit into a terminal and cut after borr

Platform

Windows

Terminal Emulator

Windows Terminal

Helix Version

helix 22.12 (22b3d3d)

@non-descriptive non-descriptive added the C-bug Category: This is a bug label Jan 26, 2023
@the-mikedavis
Copy link
Member

The gutter elements should be plural and use kebab-case: ["diagnostics", "line-numbers"]. That's not the bug here though: this needs the same change from e83ce72 for

while let Some(gutter) = seq.next_element::<&str>()? {
because of the update to the toml dependency

As a workaround you can use gutters.layout = ["diagnostics", "line-numbers"]

@the-mikedavis the-mikedavis added E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR labels Jan 26, 2023
@non-descriptive
Copy link
Author

I've got my settings from site docs and they error the same way.

@pokkos
Copy link
Contributor

pokkos commented Jan 26, 2023

I encountered that issue too and implemented that small fix locally. I will create an PR for it.

@non-descriptive : does it work for you with the workaround mentioned? (gutters.layout = ["diagnostics", "line-numbers"])

@the-mikedavis
Copy link
Member

Where do you see diagnostic and line_number in the docs? I see them listed correctly in the release docs https://docs.helix-editor.com/configuration.html#editor-section and the master docs https://docs.helix-editor.com/master/configuration.html#editorgutters-section

@non-descriptive
Copy link
Author

non-descriptive commented Jan 26, 2023

@pokkos No, workaround also yields error about strings borrow.
@the-mikedavis Initially I used only things I found in the docs, and when started looking for potential opened issues I found 2206 and tried keys from it - unkebabed line_numbers and plural diagnostics. Result is the same and it's not about invalid keys or something, as you can see. When the keys for anything were invalid it explicitly wrote about it with suggestions.

@pokkos
Copy link
Contributor

pokkos commented Jan 27, 2023

@non-descriptive Can you try again with the current mainline and the correct key values as stated in the documentation (plural, kebab-case)?

@non-descriptive
Copy link
Author

Works fine with correct values. Invalid values messages yield parsing error as well as suggestion.

Bad config: TOML parse error at line 9, column 11
  |
9 | gutters = [
  |           ^^^^^^^^^^^^
Gutter type can only be `diagnostics` or `line-numbers`.

Before update it was just suggestion about proper values. It's probably should be reported as separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug E-good-first-issue Call for participation: Issues suitable for new contributors E-has-instructions Call for participation: Has instructions for fixing the issue and opening a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants