`${` inside a string breaks the string
{
test = "hello ${interpolated} world";
}
Running the command (nth 3 (syntax-ppss)) up until the $ will return true indicating this is within a string, but when you hit the { it will return nil until one character after the end }.
"~hello $~{interpolated} ~world~"
The strike-through parts are the ones regarded as string.
This breaks tools operating on strings.
I noticed this as part of: https://github.com/twlz0ne/separedit.el/issues/9
So I'm not sure if there's a good solution. $ probably shouldn't be part of the string while the trailing should be.
But we want the stuff in the ${} to be handled like any other Nix code, not treated like a string. You can use the nix-string-type to get a little better view of where the string starts and ends, but it's not
Unfortunately, existing behavior makes using " text object in evil-mode unusable in nix files with string interpolation`.
This is still an issue unfortunately.
Common operations like trying to clear the contents of a string via e.g. c i " are completely unreliable in nix-mode because the inner dection after a string with antiquotation is completely broken.
FWIW, python-mode keeps the string syntax property for f-strings, and just propertises the expression within curly braces. Perhaps this is what we should do as well.