nix-community / nix-emacs

A set of useful Emacs modes and functions for users of Nix and Nix OS.
226 stars 32 forks source link

Bugfix: backend was taking over completion in all modes #26

Closed zenguine closed 8 years ago

zenguine commented 8 years ago

Previously when the company-nixos-options company backend was enabled, other backends for other modes were not getting a chance to run because this backend never returned nil to the 'prefix' command. This caused this completion to be the only one that ever fired regardless of mode. The below change checks whether we are in a mode called 'nix-mode' or whether the file extension is .nix and if neither is true, passes control to the next backend. This should fix the issue.

travisbhartwell commented 8 years ago

Woah, can't believe we hadn't noticed this.

Thanks for the fix!