nix.el 985 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. (setq nix-repl-executable-args
  2. (list "repl"
  3. (expand-file-name "~/.nix-defexpr/channels/nixos-unstable")))
  4. (defvar wi-nix--prettify-symbols-alist
  5. '(("versionAtLeastCut" . ?≥)
  6. ("versionOlderCut" . ?<)
  7. ("deleteTests" . ?Ø)
  8. ("++" . ⧺)
  9. ("==" . ?≡)
  10. ("!=" . ?≠)
  11. ("&&" . ?∧)
  12. ("||" . ?∨)
  13. ("generic" . ?g)
  14. ("version" . ?v)
  15. ("optional" . ?o)
  16. ("optionals" . (?o (Br . Bl) ?s)))
  17. "Alist of symbol prettifications for `nix-mode'.")
  18. (add-hook 'nix-mode-hook
  19. (lambda ()
  20. (set (make-local-variable 'prettify-symbols-alist)
  21. wi-nix--prettify-symbols-alist)))
  22. (defun dumb-jump-init-nixpkgs ()
  23. (interactive)
  24. (with-temp-file ".dumbjump" (insert "+/home/oleg/src/nixpkgs")))
  25. (add-hook 'nix-mode-hook 'goto-address-mode)
  26. (define-auto-insert
  27. "shell.nix"
  28. ["nix/shell.nix" yas-expand-current-buffer])
  29. (define-auto-insert
  30. "flake.nix"
  31. ["nix/flake.nix" yas-expand-current-buffer])