Skip to content

Commit 3d71be2

Browse files
maxrabinMax Rabin
andauthored
Add pyright lsp for Python (anomalyco#551)
Co-authored-by: Max Rabin <[email protected]>
1 parent 58baca2 commit 3d71be2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/opencode/src/lsp/server.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,24 @@ export namespace LSPServer {
123123
}
124124
},
125125
}
126+
127+
export const Pyright: Info = {
128+
id: "pyright",
129+
extensions: [".py", ".pyi"],
130+
async spawn() {
131+
const proc = spawn(
132+
BunProc.which(),
133+
["x", "pyright-langserver", "--stdio"],
134+
{
135+
env: {
136+
...process.env,
137+
BUN_BE_BUN: "1",
138+
},
139+
},
140+
)
141+
return {
142+
process: proc,
143+
}
144+
},
145+
}
126146
}

0 commit comments

Comments
 (0)