Skip to content

YAML treesitter indentation is buggy #1505

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

Open
1 task done
datho7561 opened this issue May 2, 2025 · 4 comments · Fixed by celsomiranda/kickstart.nvim#3 · May be fixed by #1506
Open
1 task done

YAML treesitter indentation is buggy #1505

datho7561 opened this issue May 2, 2025 · 4 comments · Fixed by celsomiranda/kickstart.nvim#3 · May be fixed by #1506

Comments

@datho7561
Copy link

Before Reporting an Issue

  • I have read the kickstart.nvim README.md.

  • I have read the appropriate plugin's documentation.

  • I have searched that this issue has not been reported before.

  • By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.

Describe the bug

The YAML treesitter indentation has an annoying indentation bug. I think it might be helpful to disable treesitter indentation for YAML files until it's resolved.

Here are some relevant discussions about it:

actual issue to follow regarding this bug:

trail of issues that lead me here

To Reproduce

  1. Make the following YAML file:
hello:
  - a

world: {}
  1. Place the cursor at the | and enter insert mode:
hello:
  - a|

world: {}
  1. Hit "Enter":
hello:
  - a
    |

world: {}
  1. Type "- ":
hello:
  - a
- |

world: {}

Desktop

  • OS: Fedora Linux 41
  • Terminal: alacritty 0.15.1 with zellij 0.42.1

Neovim Version

NVIM v0.10.4
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189
datho7561 added a commit to datho7561/kickstart.nvim that referenced this issue May 2, 2025
@datho7561 datho7561 linked a pull request May 2, 2025 that will close this issue
datho7561 added a commit to datho7561/kickstart.nvim that referenced this issue May 2, 2025
@feoh
Copy link
Collaborator

feoh commented May 11, 2025

I have no issue with this but the last time we did this kind of change, for Ruby on Rails in that case, it was a nightmare and 5000 people popped up screaming about who moved my cheese.

How do people feel about this change proposal?

@oriori1703
Copy link
Contributor

I could not reproduce the issue. This is the result I got:

hello:
  - a
    -|

world: {}

Am I missing something?

neovim version

NVIM v0.11.1
Build type: RelWithDebInfo
LuaJIT 2.1.1744318430
Run "nvim -V1 -v" for more info

@oriori1703
Copy link
Contributor

nvm, I check the original issue and understood what I was doing wrong.
I did realise that "|" was supposed to be the cursor, so I just typed it.

After realising that I could reproduce the issue.

@oriori1703
Copy link
Contributor

I have no issue with this but the last time we did this kind of change, for Ruby on Rails in that case, it was a nightmare and 5000 people popped up screaming about who moved my cheese.

Maybe if we linked the nvim-treesitter issue people won't complain to kickstart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants