nix-ts-mode
nix-ts-mode copied to clipboard
String interpolations with `"` in them confuse evil inner detection
Consider the following snippet:
(enableFeature withPixelutils "pixelutils")
"--bindir=${placeholder "bin"}/bin"
Placing the cursor inside pixelutils and entering di" in evil-mode deletes everything inside the quotes as expected.
Doing the same with the cursor placed anywhere within the second string however has strange results:
- Before
"bin":""bin"}/bin" - Inside
"bin":"--bindir=${placeholder "bin"" - After
"bin":"--bindir=${placeholder "bin""
I don't know what exact heuristics evil-mode uses to determine quotation boundaries but something is obviously awry.
In all fairness, there are similar problems with nix-mode
Yes indeed; one of my pet peeves. It's arguably worse in nix-mode though as it breaks quote detection in the entire file while nix-ts-mode only breaks it in strings that contain interpolation.
Still, it'd be great if tree-sitter could be leveraged to actually fix this.