Skip to content

Not showing chunk if curly brace is not at start of line #147

@pinpox

Description

@pinpox

Describe the bug

If the brace { is not at the beginning of the line, the chunk is not correctly shown.
Consider the following code:

{
  description = "foobar";

  # Nixpkgs / NixOS version to use.
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";
  };

  outputs =
    {
      arg1,
      arg2,
      ...
    }:
    {
      something = "foo";
    };
}

Placing the cursor on line 5: looks like this (no chunk indicated):
image
Placing it on line 10 looks like this (works correctly):
image

I would expect the chunk to be shown in both cases. Not having the brace at the start of the line is common in multiple languages, I have only verified the bug with Nix yet.

To Reproduce
Steps to reproduce the behavior:

  1. Open snipped above in editor
  2. Place cursor on line 5 (inputs =)
  3. Place cursor on line 10 ({ below outputs =)
  4. Compare visual

Expected behavior
Chunk is indicated in both cases

Screenshots
see above

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions