mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-28 20:49:55 +00:00
refactor: migrate src/lsp/server.ts from Bun.file()/Bun.write() to Filesystem module (#14138)
This commit is contained in:
parent
cfea5c73de
commit
d366a1430f
4 changed files with 179 additions and 38 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue