Install for Emacs with Nix
Supported operating systems:
1. Install prerequisites
In order to install quick-lint-js' Nix package, you must first install Nix or NixOS.
Install one of the following Emacs plugins:
- Eglot (recommended) (included in Emacs version 29 or newer)
- Flymake (included in Emacs version 26 or newer)
- Flycheck
- LSP Mode
2. Install quick-lint-js
Open a terminal, and run the following command:
nix-env -iA nixpkgs.quick-lint-js
If the above command fails with “error: attribute 'quick-lint-js' in selection path 'nixpkgs.quick-lint-js' not found”, your Nixpkgs is out of date. Either update Nixpkgs, or install from quick-lint-js' repository instead:
nix-env -f https://c.quick-lint-js.com/releases/3.2.0/source/quick-lint-js-3.2.0.tar.gz -iA quick-lint-js
3. Install Emacs plugin
- Download the quick-lint-js Emacs plugin.
-
Extract
quick-lint-js-emacs.zip
's files into a directory somewhere safe (for example,~/.emacs/quick-lint-js-emacs/
). -
Add the
quick-lint-js-emacs
directory to the Emacsload-path
variable. For example, add the following line to your init file (e.g.~/.emacs
):(add-to-list 'load-path "~/.emacs/quick-lint-js-emacs")
- Restart Emacs.