Install for Sublime Text with Nix
Supported operating systems:
1. Install prerequisites
Install the LSP Sublime Text package:
- Open Sublime Text.
- Open the Command Palette (press Control-Shift-P) and type "Install Package Control".
- Open the Command Palette and type "Package Control: Install Package", then type "LSP".
2. Install quick-lint-js
In order to install quick-lint-js' Nix package, you must first install Nix or NixOS.
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. Configure Sublime Text
After installing quick-lint-js, you need to register quick-lint-js in Sublime Text's LSP package:
- Open Sublime Text.
- Open the Command Palette (press Control-Shift-P) and type "Preferences: LSP Settings".
-
In the
LSP.sublime-settings
file which opens, add the following code. If"clients"
already exists, add"quick-lint-js"
inside the existing{ }
:{ "clients": { "quick-lint-js": { "command": ["quick-lint-js", "--lsp-server"], "enabled": true, "selector": "source.js | source.jsx | source.ts | source.tsx" } } }