Skip to content

Commit f5b960a

Browse files
mochaaPgithub-actions[bot]
authored andcommitted
chore: Auto generate docs
1 parent e508fc0 commit f5b960a

File tree

5 files changed

+74
-15
lines changed

5 files changed

+74
-15
lines changed

doc/BUILTINS.md

+39-5
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ local sources = { null_ls.builtins.formatting.biome }
19161916
- Filetypes: `{ "javascript", "typescript", "javascriptreact", "typescriptreact", "json", "jsonc" }`
19171917
- Method: `formatting`
19181918
- Command: `biome`
1919-
- Args: `{ "format", "--write", "$FILENAME" }`
1919+
- Args: `{ "format", "--stdin-file-path", "$FILENAME" }`
19201920

19211921
#### Notes
19221922

@@ -2849,7 +2849,7 @@ local sources = { null_ls.builtins.formatting.ktlint }
28492849
- Filetypes: `{ "kotlin" }`
28502850
- Method: `formatting`
28512851
- Command: `ktlint`
2852-
- Args: `{ "--format", "--stdin", "**/*.kt", "**/*.kts" }`
2852+
- Args: `{ "--format", "--stdin", "--log-level=none", "**/*.kt", "**/*.kts" }`
28532853

28542854
### [leptosfmt](https://github.com/bram209/leptosfmt)
28552855

@@ -3044,6 +3044,23 @@ local sources = { null_ls.builtins.formatting.ocdc }
30443044
- Command: `ocdc`
30453045
- Args: `{ "--path", "-" }`
30463046

3047+
### [opentofu_fmt](https://opentofu.org/docs/cli/commands/fmt/#usage)
3048+
3049+
The opentofu-fmt command rewrites `opentofu` configuration files to a canonical format and style.
3050+
3051+
#### Usage
3052+
3053+
```lua
3054+
local sources = { null_ls.builtins.formatting.opentofu_fmt }
3055+
```
3056+
3057+
#### Defaults
3058+
3059+
- Filetypes: `{ "terraform", "tf", "terraform-vars" }`
3060+
- Method: `formatting`
3061+
- Command: `tofu`
3062+
- Args: `{ "fmt", "-" }`
3063+
30473064
### [packer](https://www.packer.io/docs/commands/fmt)
30483065

30493066
The packer fmt Packer command is used to format HCL2 configuration files to a canonical format and style.
@@ -3140,14 +3157,14 @@ local sources = { null_ls.builtins.formatting.prettier }
31403157

31413158
#### Defaults
31423159

3143-
- Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars" }`
3160+
- Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro" }`
31443161
- Methods: `formatting, range_formatting`
31453162
- Command: `prettier`
31463163
- Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettier.lua))
31473164

31483165
#### Notes
31493166

3150-
- Supports more filetypes such as [Svelte](https://github.com/sveltejs/prettier-plugin-svelte) and [TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml) via plugins. These filetypes are not enabled by default, but you can follow the instructions [here](BUILTIN_CONFIG.md#filetypes) to define your own list of filetypes.
3167+
- [TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml) via plugins. These filetypes are not enabled by default, but you can follow the instructions [here](BUILTIN_CONFIG.md#filetypes) to define your own list of filetypes.
31513168
- To increase speed, you may want to try [prettierd](https://github.com/fsouza/prettierd). You can also set up [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) and format via [eslint_d](https://github.com/mantoni/eslint_d.js/).
31523169

31533170
### [prettierd](https://github.com/fsouza/prettierd)
@@ -3162,7 +3179,7 @@ local sources = { null_ls.builtins.formatting.prettierd }
31623179

31633180
#### Defaults
31643181

3165-
- Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars" }`
3182+
- Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro" }`
31663183
- Methods: `formatting, range_formatting`
31673184
- Command: `prettierd`
31683185
- Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettierd.lua))
@@ -3903,6 +3920,23 @@ local sources = { null_ls.builtins.formatting.verible_verilog_format }
39033920
- Command: `verible-verilog-format`
39043921
- Args: `{ "--stdin_name", "$FILENAME", "-" }`
39053922

3923+
### [xmllint](http://xmlsoft.org/xmllint.html)
3924+
3925+
Despite the name, xmllint can be used to format XML files as well as lint them, and that's the mode this builtin is using.
3926+
3927+
#### Usage
3928+
3929+
```lua
3930+
local sources = { null_ls.builtins.formatting.xmllint }
3931+
```
3932+
3933+
#### Defaults
3934+
3935+
- Filetypes: `{ "xml" }`
3936+
- Method: `formatting`
3937+
- Command: `xmllint`
3938+
- Args: `{ "--format", "-" }`
3939+
39063940
### [yamlfix](https://github.com/lyz-code/yamlfix)
39073941

39083942
A configurable YAML formatter that keeps comments.

doc/builtins.json

+18-2
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,13 @@
881881
"markdown"
882882
]
883883
},
884+
"opentofu_fmt": {
885+
"filetypes": [
886+
"terraform",
887+
"tf",
888+
"terraform-vars"
889+
]
890+
},
884891
"packer": {
885892
"filetypes": [
886893
"hcl"
@@ -924,7 +931,9 @@
924931
"markdown",
925932
"markdown.mdx",
926933
"graphql",
927-
"handlebars"
934+
"handlebars",
935+
"svelte",
936+
"astro"
928937
]
929938
},
930939
"prettierd": {
@@ -944,7 +953,9 @@
944953
"markdown",
945954
"markdown.mdx",
946955
"graphql",
947-
"handlebars"
956+
"handlebars",
957+
"svelte",
958+
"astro"
948959
]
949960
},
950961
"pretty_php": {
@@ -1175,6 +1186,11 @@
11751186
"systemverilog"
11761187
]
11771188
},
1189+
"xmllint": {
1190+
"filetypes": [
1191+
"xml"
1192+
]
1193+
},
11781194
"yamlfix": {
11791195
"filetypes": [
11801196
"yaml"

doc/null-ls.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*null-ls.txt* Last change: 2024 April 18
1+
*null-ls.txt* Last change: 2024 May 30
22

33
==============================================================================
44
Table of Contents *null-ls-table-of-contents*

lua/null-ls/builtins/_meta/filetype_map.lua

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ return {
1414
asm = {
1515
formatting = { "asmfmt" }
1616
},
17+
astro = {
18+
formatting = { "prettier", "prettierd" }
19+
},
1720
beancount = {
1821
diagnostics = { "bean_check" },
1922
formatting = { "bean_format" }
@@ -382,7 +385,7 @@ return {
382385
formatting = { "surface" }
383386
},
384387
svelte = {
385-
formatting = { "rustywind" }
388+
formatting = { "prettier", "prettierd", "rustywind" }
386389
},
387390
swift = {
388391
diagnostics = { "swiftlint" },
@@ -397,11 +400,11 @@ return {
397400
},
398401
terraform = {
399402
diagnostics = { "terraform_validate", "tfsec", "trivy" },
400-
formatting = { "terraform_fmt" }
403+
formatting = { "opentofu_fmt", "terraform_fmt" }
401404
},
402405
["terraform-vars"] = {
403406
diagnostics = { "terraform_validate", "tfsec", "trivy" },
404-
formatting = { "terraform_fmt" }
407+
formatting = { "opentofu_fmt", "terraform_fmt" }
405408
},
406409
tex = {
407410
code_actions = { "proselint" },
@@ -413,7 +416,7 @@ return {
413416
},
414417
tf = {
415418
diagnostics = { "terraform_validate", "tfsec", "trivy" },
416-
formatting = { "terraform_fmt" }
419+
formatting = { "opentofu_fmt", "terraform_fmt" }
417420
},
418421
twig = {
419422
diagnostics = { "twigcs" }
@@ -452,7 +455,7 @@ return {
452455
},
453456
xml = {
454457
diagnostics = { "tidy" },
455-
formatting = { "tidy" }
458+
formatting = { "tidy", "xmllint" }
456459
},
457460
yaml = {
458461
diagnostics = { "actionlint", "cfn_lint", "spectral", "vacuum", "yamllint" },

lua/null-ls/builtins/_meta/formatting.lua

+8-2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ return {
208208
ocdc = {
209209
filetypes = { "markdown" }
210210
},
211+
opentofu_fmt = {
212+
filetypes = { "terraform", "tf", "terraform-vars" }
213+
},
211214
packer = {
212215
filetypes = { "hcl" }
213216
},
@@ -224,10 +227,10 @@ return {
224227
filetypes = { "php" }
225228
},
226229
prettier = {
227-
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars" }
230+
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro" }
228231
},
229232
prettierd = {
230-
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars" }
233+
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro" }
231234
},
232235
pretty_php = {
233236
filetypes = { "php" }
@@ -352,6 +355,9 @@ return {
352355
verible_verilog_format = {
353356
filetypes = { "verilog", "systemverilog" }
354357
},
358+
xmllint = {
359+
filetypes = { "xml" }
360+
},
355361
yamlfix = {
356362
filetypes = { "yaml" }
357363
},

0 commit comments

Comments
 (0)