Skip to content

Commit 723d694

Browse files
committed
docs: neovim setup in README.md
1 parent 1984133 commit 723d694

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,28 @@ while the latest release of topiary-cli still uses the other way.
2727

2828
## usage
2929

30-
`topiary format script.nu`
30+
+ `topiary format script.nu`
31+
+ neovim: format on save with [conform.nvim](https://github.com/stevearc/conform.nvim):
32+
33+
```lua
34+
-- lazy.nvim setup
35+
{
36+
"stevearc/conform.nvim",
37+
dependencies = { "mason.nvim" },
38+
event = "VeryLazy",
39+
opts = {
40+
formatters_by_ft = {
41+
nu = { "topiary_nu" },
42+
},
43+
formatters = {
44+
topiary_nu = {
45+
command = "topiary",
46+
args = { "format", "--language", "nu" },
47+
},
48+
},
49+
},
50+
},
51+
```
3152

3253
## contribute
3354

0 commit comments

Comments
 (0)