Fixed powershell formatting on linux/windows, env vars have to be set in term tho

This commit is contained in:
2026-08-30 17:06:14 +02:00
parent acf072e634
commit 5b0b6f32c5
10 changed files with 125 additions and 114 deletions
+25 -5
View File
@@ -21,14 +21,13 @@ local capabilities =
vim.tbl_deep_extend("force", {}, vim.lsp.protocol.make_client_capabilities(), cmp_lsp.default_capabilities())
require("fidget").setup {}
require("mason").setup()
require("mason-lspconfig").setup {
automatic_enable = true,
automatic_enable = false,
ensure_installed = {
"lua_ls",
"qmlls",
"rust_analyzer",
"gopls",
"powershell_es",
},
handlers = {
function(server_name) -- default handler (optional)
@@ -51,6 +50,26 @@ require("mason-lspconfig").setup {
}
end,
["powershell_es"] = function()
local lspconfig = require "lspconfig"
lspconfig.powershell_es.setup {
capabilities = capabilities,
}
end,
["rust_analyzer"] = function()
local lspconfig = require "lspconfig"
lspconfig.rust_analyzer.setup {
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
cargo = { allFeatures = true },
checkOnSave = { command = "clippy" },
},
},
}
end,
zls = function()
local lspconfig = require "lspconfig"
lspconfig.zls.setup {
@@ -67,6 +86,7 @@ require("mason-lspconfig").setup {
vim.g.zig_fmt_parse_errors = 0
vim.g.zig_fmt_autosave = 0
end,
["lua_ls"] = function()
local lspconfig = require "lspconfig"
lspconfig.lua_ls.setup {
@@ -265,7 +285,7 @@ local servers = {
"sourcekit",
"qmlls",
"tailwindcss",
"systemd-lsp",
-- "systemd-lsp",
require("mason-lspconfig").get_installed_servers(),
}
@@ -273,7 +293,7 @@ local flat_servers = flatten_to_array(servers)
for _, server in ipairs(flat_servers) do
lspconfig(server, {
on_attach = function(client, bufnr)
on_attach = function(client)
if client.name == "typos_lsp" or client.name == "copilot" then
return
end