From 6c99f3287b3f10a08cbb0ffeada48e2a09a930c7 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 19 Mar 2020 08:38:01 +0000 Subject: [PATCH] Emacs: autocomplete for .nix --- etc/emacs.el | 14 ++++++++++++++ packages.nix | 2 ++ 2 files changed, 16 insertions(+) diff --git a/etc/emacs.el b/etc/emacs.el index af4aa77..79ee111 100644 --- a/etc/emacs.el +++ b/etc/emacs.el @@ -1,6 +1,20 @@ (setq explicit-shell-file-name "/bin/sh") (setq shell-file-name "sh") +;; +;; +;; NixOS +;; +;; + + +(global-set-key (kbd "C-c C-S-n") 'helm-nixos-options) + +(add-hook 'after-init-hook 'global-company-mode) +(with-eval-after-load 'company + (add-to-list 'company-backends 'company-nixos-options) + (global-set-key (kbd "TAB") #'company-indent-or-complete-common)) + ;; ;; ;; Backups diff --git a/packages.nix b/packages.nix index 0fc085b..9f52b1d 100644 --- a/packages.nix +++ b/packages.nix @@ -90,6 +90,8 @@ in { zenburn-theme solarized-theme # IM telega + # NixOS + company-nixos-options helm-nixos-options ]) ++ # GNU Elpa