Updating Doom Emacs.

This commit is contained in:
Derek Taylor
2020-06-19 22:43:40 -05:00
parent 0f664d532a
commit a5c86c514a
453 changed files with 13527 additions and 12455 deletions

View File

@@ -39,3 +39,25 @@
((user-error "No search engine is enabled. Enable helm or ivy!")))
;; Tell lookup module to let us handle things from here
'deferred)
;;;###autoload
(defun +nix-shell-init-mode ()
"Resolve a (cached-)?nix-shell shebang to the correct major mode."
(save-excursion
(goto-char (point-min))
(save-match-data
(if (not (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t))
(message "Couldn't determine mode for this script")
(let* ((interp (match-string 1))
(mode
(assoc-default
interp
(mapcar (lambda (e)
(cons (format "\\`%s\\'" (car e))
(cdr e)))
interpreter-mode-alist)
#'string-match-p)))
(when mode
(prog1 (set-auto-mode-0 mode)
(when (eq major-mode 'sh-mode)
(sh-set-shell interp)))))))))

View File

@@ -1,6 +1,7 @@
;;; lang/nix/config.el -*- lexical-binding: t; -*-
(use-package! nix-mode
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
:mode "\\.nix\\'"
:config
(set-company-backend! 'nix-mode 'company-nixos-options)

View File

@@ -1,11 +1,11 @@
;; -*- no-byte-compile: t; -*-
;;; lang/nix/packages.el
(package! nix-mode)
(package! nix-update)
(package! nix-mode :pin "5b5961780f3b1c1b62453d2087f775298980f10d")
(package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7")
(when (featurep! :completion company)
(package! company-nixos-options))
(package! company-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297"))
(when (featurep! :completion helm)
(package! helm-nixos-options))
(package! helm-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297"))