Skip to content

Commit

Permalink
Patch broken nix completion backend (see purcell#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Jan 27, 2018
1 parent 342baea commit 938b946
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lisp/init-nix.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
(when (maybe-require-package 'nixos-options)
(when (maybe-require-package 'company-nixos-options)
(after-load 'company

;; Patch pending https://github.com/travisbhartwell/nix-emacs/pull/46
(defun company-nixos--in-nix-context-p ()
(or (derived-mode-p 'nix-mode 'nix-repl-mode)
(let ((file-name (buffer-file-name (current-buffer))))
(and file-name (equal "nix" (file-name-extension file-name))))))

(add-to-list 'company-backends 'company-nixos-options))))


Expand Down

0 comments on commit 938b946

Please sign in to comment.