nix-mode
nix-mode copied to clipboard
Consecutive keywords are not rightfully colorised
Issue description
Keywords that are only space-separated are not colorised as they should: only the first one has the keyword font, the next one has regular colorisation. Inserting a newline in between solves it.
Examples
Note how github will colorise every keyword, but in the comments I point out the ones that will not get colored by Emacs.
{
a = let in {}; # `let` is colorized, not `in`
b = let something = 3; in rec {}; # `rec` is not colorised
c = let in with rec {}; 3; # `let` and `with` are colorised, not `in` and `rec`.
}
Also, in this case, it all works as in github:
{
a = let
in {};
b = let something = 3; in
rec {};
c = let
in
with
rec {}; 3;
}
Version
I tested this in the latest NixOS unstable version there is (at the time writing), Emacs 29.0.50 and nix-mode is version 20220505.1706 (the latest published on melpa for the time being). However, this seems like a lasting bug because I have experienced this strange behavior for some time now.