refactor: migrate src/lsp/server.ts from Bun.file()/Bun.write() to Filesystem module (#14138)

This commit is contained in:
Dax
2026-02-18 16:41:07 -05:00
committed by GitHub
parent cfea5c73de
commit d366a1430f
4 changed files with 179 additions and 38 deletions

View File

@@ -147,8 +147,7 @@ export namespace LSPClient {
notify: {
async open(input: { path: string }) {
input.path = path.isAbsolute(input.path) ? input.path : path.resolve(Instance.directory, input.path)
const file = Bun.file(input.path)
const text = await file.text()
const text = await Filesystem.readText(input.path)
const extension = path.extname(input.path)
const languageId = LANGUAGE_EXTENSIONS[extension] ?? "plaintext"