[LSP] Improve looks of config
This commit is contained in:
		| @@ -112,6 +112,9 @@ return { | ||||
| 			on_attach = on_attach, | ||||
| 		}) | ||||
|  | ||||
| 		-- ┌                                               ┐ | ||||
| 		-- │                      LUA                      │ | ||||
| 		-- └                                               ┘ | ||||
| 		lspconfig.lua_ls.setup({ | ||||
| 			capabilities = capabilities, | ||||
| 			on_attach = on_attach, | ||||
| @@ -137,14 +140,20 @@ return { | ||||
| 			on_attach = on_attach, | ||||
| 		}) | ||||
|  | ||||
| 		-- ┌                                               ┐ | ||||
| 		-- │                    Python                     │ | ||||
| 		-- └                                               ┘ | ||||
| 		lspconfig.pyright.setup({ | ||||
| 			capabilities = capabilities, | ||||
| 			on_attach = on_attach, | ||||
| 		}) | ||||
|  | ||||
| 		-- ┌                                               ┐ | ||||
| 		-- │            Vue, TS, JS, TSX & JSX             │ | ||||
| 		-- └                                               ┘ | ||||
| 		lspconfig.volar.setup({ | ||||
| 		    capabilities = capabilities, | ||||
| 		    on_attach = on_attach | ||||
| 			capabilities = capabilities, | ||||
| 			on_attach = on_attach, | ||||
| 		}) | ||||
| 		local mason_packages = vim.fn.stdpath("data") .. "/mason/packages" | ||||
| 		local volar_path = mason_packages .. "/vue-language-server/node_modules/@vue/language-server" | ||||
| @@ -156,7 +165,7 @@ return { | ||||
| 					{ | ||||
| 						name = "@vue/typescript-plugin", | ||||
| 						-- location = "/usr/lib/node_modules/@vue/typescript-plugin", | ||||
|                         location = volar_path, | ||||
| 						location = volar_path, | ||||
| 						languages = { "vue" }, | ||||
| 					}, | ||||
| 				}, | ||||
|   | ||||
| @@ -1,16 +1,39 @@ | ||||
| return { | ||||
|     "nvimtools/none-ls.nvim", | ||||
|     config = function() | ||||
|         local null_ls = require("null-ls") | ||||
| 	"nvimtools/none-ls.nvim", | ||||
| 	config = function() | ||||
| 		local null_ls = require("null-ls") | ||||
|  | ||||
|         null_ls.setup({ | ||||
|             sources = { | ||||
|                 null_ls.builtins.formatting.stylua, | ||||
|                 null_ls.builtins.formatting.prettier, | ||||
|                 null_ls.builtins.formatting.shfmt, | ||||
|                 null_ls.builtins.diagnostics.eslint, | ||||
|                 null_ls.builtins.formatting.black, | ||||
|             }, | ||||
|         }) | ||||
|     end, | ||||
| 		null_ls.setup({ | ||||
| 			sources = { | ||||
| 				null_ls.builtins.formatting.stylua, | ||||
| 				null_ls.builtins.formatting.prettier.with({ | ||||
| 					extra_args = { | ||||
|                         "--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" | ||||
| 					}, | ||||
| 				}), | ||||
| 				null_ls.builtins.formatting.shfmt, | ||||
| 				null_ls.builtins.diagnostics.eslint, | ||||
| 				null_ls.builtins.formatting.black, | ||||
| 			}, | ||||
| 		}) | ||||
| 	end, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user