local capabilities = vim.lsp.protocol.make_client_capabilities() vim.lsp.config["*"] = { capabilities = capabilities, enable = true } vim.lsp.enable({ "bash-ls", "lua-language-server", "nil", }) vim.diagnostic.config({ ["signs"] = true, ["underline"] = true, ["update_in_insert"] = false, ["virtual_lines"] = false, ["virtual_text"] = true, }) vim.lsp.config["bash-ls"] = { cmd = { "bash-language-server", "start" }, enable = true, filetypes = { "bash", "sh" }, root_markers = { ".git" }, settings = { basheIde = { globPattern = vim.env.GLOB_PATTERN or "*@(.sh|.inc|.bash|.command)" } }, } vim.lsp.config["lua-language-server"] = { cmd = { "lua-language-server" }, enable = true, filetypes = { "lua" }, root_markers = { ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git", }, } vim.lsp.config["nil"] = { cmd = { "nil" }, enable = true, filetypes = { "nix" }, root_markers = { ".git", "flake.nix" }, settings = { ["nil"] = { formatting = { command = { "nixfmt" } }, }, }, }