Add Gleam LSP and formatter (#5514)

This commit is contained in:
Lawrence Sarpong
2025-12-14 16:51:08 +00:00
committed by GitHub
parent 90d44751e7
commit e6a0a005d6
5 changed files with 30 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
".gitrebase": "git-rebase",
".go": "go",
".groovy": "groovy",
".gleam": "gleam",
".hbs": "handlebars",
".handlebars": "handlebars",
".hs": "haskell",

View File

@@ -1509,4 +1509,22 @@ export namespace LSPServer {
}
},
}
export const Gleam: Info = {
id: "gleam",
extensions: [".gleam"],
root: NearestRoot(["gleam.toml"]),
async spawn(root) {
const gleam = Bun.which("gleam")
if (!gleam) {
log.info("gleam not found, please install gleam first")
return
}
return {
process: spawn(gleam, ["lsp"], {
cwd: root,
}),
}
},
}
}