LnL7 / vim-nix

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

Wonky highlighting after '' *sometimes* #7

Closed jeaye closed 6 years ago

jeaye commented 8 years ago

I've been able to reproduce this using this text (the preceding newlines are intentional): https://gist.github.com/jeaye/3b75f72ecd266e6fde6f

It may not happen at first, but scrolling (with the mouse seems to help) down to the bottom, then scrolling back to the top (not with gg). Once you're at the top, click the first line to reset the cursor (again, not gg) and scroll back down again.

These steps are crazily convoluted and the problem must be simpler, but this is what I have right now; let me know if you can reproduce it.

rnhmjoj commented 8 years ago

Yeah, I can confirm. With the method you described I can reproduce it but I rarely scroll with the mouse and happens to me a lot anyway, so it must be triggered by something more general.

rnhmjoj commented 8 years ago

Also happens when there is a string like this:

buildPhase = ''
  [...]
  patchelf --set-rpath "$libPath" binary
'';

after I remove the quotes from $libPath

And when selecting a bracket or parenthesis in a string that contains interpolations like:

buildCommand = ''
  lndir ${core} $out
  for i in ${toString (args.buildDirs or [])} avidemux_plugins; do
    [...]
'';
aszlig commented 8 years ago

Hm, I can't really reproduce this, what exactly is "wonky" there? Do you have a screen shot, or even better would be a Vader test that actually reproduces the issue.

nicknovitski commented 7 years ago

I had this problem (and others), but it turned out to be a conflict with the default settings of the vim_configurable package. If you're installing Vim with plugins via Nix, I'd recommend disabling the built-in nix filetype "plugin" in your config.nix.

rnhmjoj commented 7 years ago

You exactly described my problem but I'm not using plugins from nix, vim_configurable or vim (neovim).

nicknovitski commented 7 years ago

Darn. The underlying cause for me was that a nix filetype was being secretly defined in the runtime folder, but it seems unlikely you've got the same problem. Sorry I couldn't help.

LnL7 commented 6 years ago

I replaced the builtin filetype support of vim_configurable, this shouldn't happen anymore.