hongdown 0.2.0-dev.73 → 0.2.0-dev.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -305,6 +305,46 @@ formatter (contributed by [Lee Dogeon][moreal zed]):
|
|
|
305
305
|
|
|
306
306
|
[moreal zed]: https://hackers.pub/@moreal/019bb141-dc94-7103-ab3d-779941125430
|
|
307
307
|
|
|
308
|
+
### Neovim
|
|
309
|
+
|
|
310
|
+
If you use [none-ls.nvim] (a community-maintained fork of *null-ls.nvim*), you
|
|
311
|
+
can register Hongdown as a formatter (contributed by [Vladimir Rubin]):
|
|
312
|
+
|
|
313
|
+
~~~~ lua
|
|
314
|
+
local null_ls = require("null-ls")
|
|
315
|
+
local hongdown = {
|
|
316
|
+
name = "hongdown",
|
|
317
|
+
method = null_ls.methods.FORMATTING,
|
|
318
|
+
filetypes = { "markdown" },
|
|
319
|
+
generator = null_ls.generator({
|
|
320
|
+
command = "hongdown",
|
|
321
|
+
args = { "--stdin" },
|
|
322
|
+
to_stdin = true,
|
|
323
|
+
from_stderr = false,
|
|
324
|
+
format = "raw",
|
|
325
|
+
check_exit_code = function(code, stderr)
|
|
326
|
+
local success = code <= 1
|
|
327
|
+
if not success then
|
|
328
|
+
print(stderr)
|
|
329
|
+
end
|
|
330
|
+
return success
|
|
331
|
+
end,
|
|
332
|
+
on_output = function(params, done)
|
|
333
|
+
local output = params.output
|
|
334
|
+
if not output then
|
|
335
|
+
return done()
|
|
336
|
+
end
|
|
337
|
+
return done({ { text = output } })
|
|
338
|
+
end,
|
|
339
|
+
}),
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
null_ls.register(hongdown)
|
|
343
|
+
~~~~
|
|
344
|
+
|
|
345
|
+
[none-ls.nvim]: https://github.com/nvimtools/none-ls.nvim
|
|
346
|
+
[Vladimir Rubin]: https://github.com/dahlia/hongdown/issues/4
|
|
347
|
+
|
|
308
348
|
|
|
309
349
|
Library usage
|
|
310
350
|
-------------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hongdown",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.75+6d4f84bb",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Markdown formatter that enforces Hong Minhee's Markdown style conventions",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"node": "\u003e=18"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@hongdown/darwin-arm64": "0.2.0-dev.
|
|
31
|
-
"@hongdown/darwin-x64": "0.2.0-dev.
|
|
32
|
-
"@hongdown/linux-arm64": "0.2.0-dev.
|
|
33
|
-
"@hongdown/linux-x64": "0.2.0-dev.
|
|
34
|
-
"@hongdown/win32-arm64": "0.2.0-dev.
|
|
35
|
-
"@hongdown/win32-x64": "0.2.0-dev.
|
|
30
|
+
"@hongdown/darwin-arm64": "0.2.0-dev.75+6d4f84bb",
|
|
31
|
+
"@hongdown/darwin-x64": "0.2.0-dev.75+6d4f84bb",
|
|
32
|
+
"@hongdown/linux-arm64": "0.2.0-dev.75+6d4f84bb",
|
|
33
|
+
"@hongdown/linux-x64": "0.2.0-dev.75+6d4f84bb",
|
|
34
|
+
"@hongdown/win32-arm64": "0.2.0-dev.75+6d4f84bb",
|
|
35
|
+
"@hongdown/win32-x64": "0.2.0-dev.75+6d4f84bb"
|
|
36
36
|
}
|
|
37
37
|
}
|