@@ -4,7 +4,10 @@
44 <img src="vscode-extension/purslint.jpg" alt="Purslint logo" width="180" />
55</p>
66<p align="center">
7− <video src="demo.mp4" width="480" controls playsinline></video>
7+ <video width="480" controls playsinline>
8+ <source src="https://github.com/user-attachments/assets/6d855014-18f5-4729-be28-e91ec2d19c8f" type="video/mp4" />
9+ Your browser does not support the video tag. <a href="https://github.com/user-attachments/assets/6d855014-18f5-4729-be28-e91ec2d19c8f">Download the demo.</a>
10+ </video>
811</p>
912
1013A PureScript linter inspired by [hlint](https://github.com/ndmitchell/hlint), providing suggestions for cleaner, more idiomatic PureScript code.
@@ -25,26 +28,29 @@ npm install -g purslint
2528purslint --help
2629```
2730
28−## Usage
29−
30−### CLI
31+### Neovim (nvim-lspconfig)
3132
32−```bash
33−# Lint a single file
34−./purslint src/Main.purs
33+After building `purslint-lsp` (see build steps below), you can configure Neovim like this:
3534
36−# Lint multiple files
37−./purslint src/*.purs
35+```lua
36+require("lspconfig").purslint = {
37+ default_config = {
38+ cmd = { "/path/to/purslint-lsp" },
39+ filetypes = { "purescript" },
40+ root_dir = require("lspconfig.util").root_pattern(".git", "spago.yaml", "package.json"),
41+ },
42+}
3843
39−# Lint with config file (optional)
40−./purslint --config purslint.json src/*.purs
44+require("lspconfig").purslint.setup({})
4145```
4246
43−### LSP (Language Server Protocol)
47+If you prefer to run the bundled JS directly:
4448
45−The LSP binary (`purslint-lsp`) provides IDE integration. It communicates via stdio using the standard LSP protocol.
49+```lua
50+cmd = { "node", "/path/to/dist/purslint-lsp.js" }
51+```
4652
47−#### Zed Editor
53+### Zed Editor
4854
4955A Zed extension is available in the `zed-extension/` directory. To install:
5056
@@ -55,27 +61,24 @@ A Zed extension is available in the `zed-extension/` directory. To install:
5561
5662The extension will automatically use the `purslint-lsp` binary.
5763
58−#### Neovim (nvim-lspconfig)
64+## Usage
5965
60−After building `purslint-lsp` (see build steps below), you can configure Neovim like this:
66+### CLI
6167
62−```lua
63−require("lspconfig").purslint = {
64− default_config = {
65− cmd = { "/path/to/purslint-lsp" },
66− filetypes = { "purescript" },
67− root_dir = require("lspconfig.util").root_pattern(".git", "spago.yaml", "package.json"),
68− },
69−}
68+```bash
69+# Lint a single file
70+./purslint src/Main.purs
7071
71−require("lspconfig").purslint.setup({})
72+# Lint multiple files
73+./purslint src/*.purs
74+
75+# Lint with config file (optional)
76+./purslint --config purslint.json src/*.purs
7277```
7378
74−If you prefer to run the bundled JS directly:
79+### LSP (Language Server Protocol)
7580
76−```lua
77−cmd = { "node", "/path/to/dist/purslint-lsp.js" }
78−```
81+The LSP binary (`purslint-lsp`) provides IDE integration. It communicates via stdio using the standard LSP protocol.
7982
8083## Features
8184