nvim-lua / nvim-lua/kickstart.nvim

YAML treesitter indentation is buggy

Open
#1,505 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
31.5k
Forks
46.6k
Avg merge
2d 16h
Merged PRs (30d)
4

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the kickstart.nvim configuration and the linked nvim-treesitter issue, then reproduce the YAML example from the report in Neovim v0.10.4. Identify where Treesitter indentation is configured for YAML; done means pressing Enter and typing "- " no longer produces the incorrect list indentation, with the reproduction checked again.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, yaml
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.