[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 05d7c828b3 187/500: Fix nix-company and mmm-mode
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 05d7c828b3 187/500: Fix nix-company and mmm-mode loading. |
Date: |
Sat, 29 Jan 2022 08:27:05 -0500 (EST) |
branch: elpa/nix-mode
commit 05d7c828b322c2656b2df8654ab3681de613f015
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Fix nix-company and mmm-mode loading.
---
nix-company.el | 5 ++++-
nix-mode.el | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/nix-company.el b/nix-company.el
index 6b912af588..19ca5cb617 100644
--- a/nix-company.el
+++ b/nix-company.el
@@ -8,6 +8,7 @@
(require 'nix-repl)
(require 'cl-lib)
+(require 'company)
(defun company-nix (command &optional arg &rest _)
"Company backend for Nix.
@@ -67,7 +68,9 @@ BUFFER check for Nix-REPL in current buffer"
(setq nix--company-last-buffer (buffer-name))))
backend-buf)))
-(add-to-list 'company-backends 'company-nix)
+;; install nix-company
+(add-hook 'nix-mode-hook (lambda ()
+ (setq-local company-backends '(company-nix))))
(provide 'nix-company)
;;; nix-company.el ends here
diff --git a/nix-mode.el b/nix-mode.el
index 177cf20532..8b56aba274 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -461,9 +461,9 @@ STRING-TYPE type of string based off of Emacs syntax table
types"
(nix-create-keymap)
(nix-create-menu)
-(when (require 'company nil 'noerror) (require 'nix-company nil 'noerror))
-
-(when (require 'mmm-mode nil 'noerror) (require 'nix-mode-mmm nil 'noerror))
+;; TODO: find a better way to load this
+(when (find-library "company") (require 'nix-company nil 'noerror))
+(when (find-library "mmm-mode") (require 'nix-mode-mmm nil 'noerror))
;;;###autoload
(defun nix-build (&optional attr dir)
- [nongnu] elpa/nix-mode f968cb98ef 097/500: Add nix-buffer., (continued)
- [nongnu] elpa/nix-mode f968cb98ef 097/500: Add nix-buffer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c0502994b5 100/500: Remove nix-mode-reload., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 956280c161 116/500: Refactor nix--antiquote-close, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode de02e17924 135/500: Fix fontification of "}${" in some contexts, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0b19f975cd 143/500: Merge pull request #28 from pvmart/fix-nix-mmm, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 719482b701 148/500: Update customizations for Nix related modes., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b3c6560f6d 166/500: Fix typo: rustfmt -> nixfmt, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 038dcf7b1b 147/500: Cleanup, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3edda90cfd 146/500: Remove nix-flycheck, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a967408f64 188/500: Don’t error when nix-shebang fails., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 05d7c828b3 187/500: Fix nix-company and mmm-mode loading.,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 281bfc1abf 176/500: Cleanup font-locks again, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 407051ad31 175/500: Add font-lock-tests.el file, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d341ef2f70 195/500: Add missing defcustom type, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode eb7623fb3b 178/500: Handle mmm-mode '' prefixes better, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode cc88a55ead 173/500: Add custom faces for Nix., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0181c35a4f 202/500: Add nix-unpack command., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0ac0271f6c 201/500: Update Homepage in .el files, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 39f29d8be4 207/500: Replace indentation code with simpler heuristics, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 57ac40d53b 214/500: Merge pull request #45 from eqyiel/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ba202b6657 220/500: Add nix-shell.el, ELPA Syncer, 2022/01/29