LnL7 / vim-nix

Vim configuration files for Nix http://nixos.org/nix
MIT License
287 stars 26 forks source link

Don't highlight `$${}` as string interpolation #24

Closed Ma27 closed 5 years ago

Ma27 commented 5 years ago

Double dollar signs in Nix strings evaluate to a two dollar signs rather than a dollar and a string interpolation:

Welcome to Nix version 2.1.3. Type :? for help.

nix-repl> ''
          $${foo}
          ''
"$${foo}\n"
Ma27 commented 5 years ago

@Lnl7 it would be great if you could have a look at this! :)

Ma27 commented 5 years ago

I didn't properly look at this yet because of the failing test.

Yeah, sorry, should've made more clear that I was unsure about the reason why the test failed.

I changed the PR to highlight $$ to avoid confusion and added a testcase for it.

Ma27 commented 5 years ago

@LnL7 anything else missing here? :)