[LSP] Improve looks of config

This commit is contained in:
Janis Hutz 2025-04-25 11:18:53 +02:00
parent 10e4d65827
commit 2a0b4634ae
2 changed files with 48 additions and 16 deletions

View File

@ -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
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"

View File

@ -6,7 +6,30 @@ return {
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier,
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,