improve erc-sasl
[Emacs.git] / lisp / init-nix.el
blob2272f8a662228bca2cff8f041ae8567363bff075
1 ;;; init-nix.el --- Support for the Nix package manager -*- lexical-binding: t -*-
2 ;;; Commentary:
3 ;;; Code:
5 (if (maybe-require-package 'nix-ts-mode)
6 ;; If the TS mode is installed, then the non-TS mode is not, so
7 ;; nobody will have added an auto-mode-alist entry
8 (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-ts-mode))
9 (maybe-require-package 'nix-mode))
11 (with-eval-after-load 'eglot
12 ;; Prefer nixd to nil, and enable in nix-ts-mode too
13 (add-to-list 'eglot-server-programs
14 `((nix-mode nix-ts-mode) . ,(eglot-alternatives '("nixd" "nil")))))
16 (maybe-require-package 'nixpkgs-fmt)
17 (maybe-require-package 'nixfmt)
19 (provide 'init-nix)
20 ;;; init-nix.el ends here