[None-LS] Improve formatting for JS/TS/etc
This commit is contained in:
		| @@ -1,5 +1,8 @@ | ||||
| return { | ||||
| 	"nvimtools/none-ls.nvim", | ||||
|     dependencies = { | ||||
|         'nvimtools/none-ls-extras.nvim' | ||||
|     }, | ||||
| 	config = function() | ||||
| 		local null_ls = require("null-ls") | ||||
|  | ||||
| @@ -7,31 +10,41 @@ return { | ||||
| 			sources = { | ||||
| 				null_ls.builtins.formatting.stylua, | ||||
| 				null_ls.builtins.formatting.prettier.with({ | ||||
| 					filetypes = { | ||||
| 						"css", | ||||
| 						"scss", | ||||
| 						"less", | ||||
| 						"html", | ||||
| 						"json", | ||||
| 						"yaml", | ||||
| 						"markdown", | ||||
| 						"graphql", | ||||
| 					}, | ||||
| 					extra_args = { | ||||
|                         "--print-width", | ||||
|                         "120", | ||||
| 						"--print-width", | ||||
| 						"120", | ||||
| 						"--tab-width", | ||||
| 						"4", | ||||
| 						"--bracket-spacing", | ||||
| 						"true", | ||||
| 						"--arrow-parens", | ||||
| 						"avoid", | ||||
|                         "--jsx-single-quote", | ||||
|                         "true", | ||||
|                         "--trailing-comma", | ||||
|                         "es5", | ||||
|                         "--no-semi", | ||||
|                         "false", | ||||
|                         "--single-quote", | ||||
|                         "true", | ||||
|                         "--bracket-same-line", | ||||
|                         "true", | ||||
|                         "--vue-indent-script-and-style", | ||||
|                         "true" | ||||
| 						"--jsx-single-quote", | ||||
| 						"true", | ||||
| 						"--trailing-comma", | ||||
| 						"es5", | ||||
| 						"--no-semi", | ||||
| 						"false", | ||||
| 						"--single-quote", | ||||
| 						"true", | ||||
| 						"--bracket-same-line", | ||||
| 						"true", | ||||
| 						"--vue-indent-script-and-style", | ||||
| 						"true", | ||||
| 					}, | ||||
| 				}), | ||||
| 				null_ls.builtins.formatting.shfmt, | ||||
| 				null_ls.builtins.diagnostics.eslint, | ||||
| 				require( 'none-ls.formatting.eslint' ), | ||||
| 				null_ls.builtins.formatting.black, | ||||
| 			}, | ||||
| 		}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user