Skip to content

Problem working with nix #2

@Futarimiti

Description

@Futarimiti

Much thanks for the plugin! It doesn't seem to be working well with nix files however, where upon saving in the breakstring buffer, an extra layer of quotes will be added:

Image

Might be worth mentioning that I have treesitter enabled on that nix file, with the syntax tree looks like this:

(source_code ; [0, 0] - [1, 0]
  expression: (attrset_expression ; [0, 0] - [0, 16]
    (binding_set ; [0, 2] - [0, 14]
      binding: (binding ; [0, 2] - [0, 14]
        attrpath: (attrpath ; [0, 2] - [0, 5]
          attr: (identifier)) ; [0, 2] - [0, 5]
        expression: (string_expression ; [0, 8] - [0, 13]
          (string_fragment)))))) ; [0, 9] - [0, 12]

Furthermore, I noticed that had you :BreakString on a double single-quotes string, it will be wrapped in double quotes as well:

# before
{ str = ''abc''; }
# after
{ str = ''"abc"''; }

If you need more info please just ask.

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